From 6cefead0fc58a034e8ddcc73399de894e7abb370 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Wed, 16 Aug 2017 14:34:16 +0200 Subject: [PATCH] delete inlines, trust the compiler --- src/capture/screenshot.h | 4 ++-- src/capture/tools/linetool.h | 2 +- src/capture/tools/markertool.h | 2 +- src/capture/widget/buttonhandler.h | 2 +- src/capture/widget/capturebutton.cpp | 2 +- src/capture/widget/capturewidget.h | 2 +- src/cli/commandlineparser.cpp | 2 +- src/cli/commandlineparser.h | 6 +++--- src/infowindow.h | 4 ++-- src/utils/filenamehandler.h | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/capture/screenshot.h b/src/capture/screenshot.h index 3cc7968f..326bbe1a 100644 --- a/src/capture/screenshot.h +++ b/src/capture/screenshot.h @@ -36,7 +36,7 @@ public: void setScreenshot(const QPixmap &); QPixmap baseScreenshot() const; QPixmap screenshot() const; - inline QPixmap croppedScreenshot(const QRect &selection) const; + QPixmap croppedScreenshot(const QRect &selection) const; QPixmap paintModification(const CaptureModification*); QPixmap paintTemporalModification(const CaptureModification*); @@ -46,7 +46,7 @@ private: QPixmap m_baseScreenshot; QPixmap m_modifiedScreenshot; - inline void paintInPainter(QPainter &, const CaptureModification *); + void paintInPainter(QPainter &, const CaptureModification *); }; diff --git a/src/capture/tools/linetool.h b/src/capture/tools/linetool.h index 008697b9..6043d8ed 100644 --- a/src/capture/tools/linetool.h +++ b/src/capture/tools/linetool.h @@ -42,7 +42,7 @@ public: void onPressed() override; private: - inline bool needsAdjustment(const QPoint &p0, const QPoint &p1) const; + bool needsAdjustment(const QPoint &p0, const QPoint &p1) const; }; diff --git a/src/capture/tools/markertool.h b/src/capture/tools/markertool.h index 06962f4a..e17e4458 100644 --- a/src/capture/tools/markertool.h +++ b/src/capture/tools/markertool.h @@ -42,7 +42,7 @@ public: void onPressed() override; private: - inline bool needsAdjustment(const QPoint &p0, const QPoint &p1) const; + bool needsAdjustment(const QPoint &p0, const QPoint &p1) const; }; diff --git a/src/capture/widget/buttonhandler.h b/src/capture/widget/buttonhandler.h index a026c52d..acf15785 100644 --- a/src/capture/widget/buttonhandler.h +++ b/src/capture/widget/buttonhandler.h @@ -80,7 +80,7 @@ private: // aux methods void addToRegion(const QVector &points, const side s); - inline void resetRegionTrack(); + void resetRegionTrack(); }; diff --git a/src/capture/widget/capturebutton.cpp b/src/capture/widget/capturebutton.cpp index 64885c66..fb22f945 100644 --- a/src/capture/widget/capturebutton.cpp +++ b/src/capture/widget/capturebutton.cpp @@ -31,7 +31,7 @@ namespace { const int BUTTON_SIZE = 30; -inline qreal getColorLuma(const QColor &c) { +qreal getColorLuma(const QColor &c) { return 0.30 * c.redF() + 0.59 * c.greenF() + 0.11 * c.blueF(); } diff --git a/src/capture/widget/capturewidget.h b/src/capture/widget/capturewidget.h index 3c6340d1..73f68bcb 100644 --- a/src/capture/widget/capturewidget.h +++ b/src/capture/widget/capturewidget.h @@ -50,7 +50,7 @@ public: ~CaptureWidget(); void updateButtons(); - inline QPixmap pixmap(); + QPixmap pixmap(); private slots: void copyScreenshot(); diff --git a/src/cli/commandlineparser.cpp b/src/cli/commandlineparser.cpp index 662dd6a8..2a796857 100644 --- a/src/cli/commandlineparser.cpp +++ b/src/cli/commandlineparser.cpp @@ -35,7 +35,7 @@ auto versionOption = CommandOption({"v", "version"}, auto helpOption = CommandOption({"h", "help"}, "Displays this help"); -inline QStringList addDashToOptionNames(const QStringList &names) { +QStringList addDashToOptionNames(const QStringList &names) { QStringList dashedNames; for (const QString &name: names) { // prepend "-" to single character options, and "--" to the others diff --git a/src/cli/commandlineparser.h b/src/cli/commandlineparser.h index 6ab0d887..4ed1fda4 100644 --- a/src/cli/commandlineparser.h +++ b/src/cli/commandlineparser.h @@ -74,15 +74,15 @@ private: QList m_foundArgs; // helper functions - inline void printVersion(); + void printVersion(); void printHelp(QStringList args, const Node *node); Node* findParent(const CommandArgument &parent); Node* recursiveParentSearch(const CommandArgument &parent, Node &node) const; - inline bool processIfOptionIsHelp(const QStringList &args, + bool processIfOptionIsHelp(const QStringList &args, QStringList::const_iterator &actualIt, Node * &actualNode); - inline bool processArgs(const QStringList &args, + bool processArgs(const QStringList &args, QStringList::const_iterator &actualIt, Node * &actualNode); bool processOptions(const QStringList &args, diff --git a/src/infowindow.h b/src/infowindow.h index ee14d547..e7d165a3 100644 --- a/src/infowindow.h +++ b/src/infowindow.h @@ -31,8 +31,8 @@ protected: void keyPressEvent(QKeyEvent *); private: - inline void initInfoTable(); - inline void initLabels(); + void initInfoTable(); + void initLabels(); QVBoxLayout *m_layout; static QVector m_keys; diff --git a/src/utils/filenamehandler.h b/src/utils/filenamehandler.h index c19752d4..f739366c 100644 --- a/src/utils/filenamehandler.h +++ b/src/utils/filenamehandler.h @@ -39,8 +39,8 @@ public slots: private: //using charArr = char[MAX_CHARACTERS]; - inline QString charArrToQString(const char *c); - inline char * QStringTocharArr(const QString &s); + QString charArrToQString(const char *c); + char * QStringTocharArr(const QString &s); void fixPath(QString &directory, QString &filename);