From 6c55755bdd54c2d474e2c8fe4c9d078e10404f26 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 11 Jan 2017 13:56:13 +0100 Subject: Autogen: Generators: Make class static method a source static function --- Source/cmQtAutoGenerators.cxx | 40 ++++++++++++++++++++-------------------- Source/cmQtAutoGenerators.h | 1 - 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ea55064..73afdc1 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -97,6 +97,25 @@ static bool ListContains(const std::vector& list, return (std::find(list.begin(), list.end(), entry) != list.end()); } +static std::string JoinExts(const std::vector& lst) +{ + if (lst.empty()) { + return ""; + } + + std::string result; + std::string separator = ","; + for (std::vector::const_iterator it = lst.begin(); + it != lst.end(); ++it) { + if (it != lst.begin()) { + result += separator; + } + result += '.' + (*it); + } + result.erase(result.end() - 1); + return result; +} + static void UicMergeOptions(std::vector& opts, const std::vector& fileOpts, bool isQt5) @@ -749,7 +768,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( err << "AutoMoc: Error: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", but could not find header \"" << basename << '{' - << this->JoinExts(headerExtensions) << "}\" "; + << JoinExts(headerExtensions) << "}\" "; if (mocSubDir.empty()) { err << "in " << scannedFileAbsPath << "\n"; } else { @@ -1509,22 +1528,3 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename) } return success; } - -std::string cmQtAutoGenerators::JoinExts(const std::vector& lst) -{ - if (lst.empty()) { - return ""; - } - - std::string result; - std::string separator = ","; - for (std::vector::const_iterator it = lst.begin(); - it != lst.end(); ++it) { - if (it != lst.begin()) { - result += separator; - } - result += '.' + (*it); - } - result.erase(result.end() - 1); - return result; -} diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ed17dcd..b9d670a 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -106,7 +106,6 @@ private: bool NameCollisionTest(const std::map& genFiles, std::multimap& collisions); bool MakeParentDirectory(const std::string& filename); - static std::string JoinExts(const std::vector& lst); // - Target names std::string OriginTargetName; -- cgit v0.12