From f3efab1da1776cf0382572c30d677bec0792729a Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 1 Apr 2021 16:40:28 +1100 Subject: [PATCH] made file function inline static --- app/common/filefunctions.cpp | 9 --------- app/common/filefunctions.h | 9 ++++++++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/common/filefunctions.cpp b/app/common/filefunctions.cpp index d3fe94c7d..31fe563b1 100644 --- a/app/common/filefunctions.cpp +++ b/app/common/filefunctions.cpp @@ -240,13 +240,4 @@ bool FileFunctions::RenameFileAllowOverwrite(const QString &from, const QString return true; } -QString FileFunctions::GetFormattedExecutableForPlatform(QString unformatted) -{ -#ifdef Q_OS_WINDOWS - unformatted.append(QStringLiteral(".exe")); -#endif - - return unformatted; -} - } diff --git a/app/common/filefunctions.h b/app/common/filefunctions.h index 6270298b2..d49fc1172 100644 --- a/app/common/filefunctions.h +++ b/app/common/filefunctions.h @@ -84,7 +84,14 @@ public: */ static bool RenameFileAllowOverwrite(const QString& from, const QString& to); - static QString GetFormattedExecutableForPlatform(QString unformatted); + inline static QString GetFormattedExecutableForPlatform(QString unformatted) + { +#ifdef Q_OS_WINDOWS + unformatted.append(QStringLiteral(".exe")); +#endif + + return unformatted; + } };