diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-12 07:56:41 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-16 16:18:48 (GMT) |
commit | dad1a6b3fbf1c9d34a6d2e5722e426234bbb5df0 (patch) | |
tree | 3f3c12c38ad156768aa33e51eec652d179768638 /Source | |
parent | 82096911461f37f0421a7a79faa179aa9e0cb25c (diff) | |
download | CMake-dad1a6b3fbf1c9d34a6d2e5722e426234bbb5df0.zip CMake-dad1a6b3fbf1c9d34a6d2e5722e426234bbb5df0.tar.gz CMake-dad1a6b3fbf1c9d34a6d2e5722e426234bbb5df0.tar.bz2 |
Autogen: Modernize by using an unnamed namespace instead of static functions
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index bf20638..a5fc5e3 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -42,7 +42,9 @@ #include "cm_memory.hxx" -static std::size_t GetParallelCPUCount() +namespace { + +std::size_t GetParallelCPUCount() { static std::size_t count = 0; // Detect only on the first call @@ -56,8 +58,8 @@ static std::size_t GetParallelCPUCount() return count; } -static std::string FileProjectRelativePath(cmMakefile* makefile, - std::string const& fileName) +std::string FileProjectRelativePath(cmMakefile* makefile, + std::string const& fileName) { std::string res; { @@ -81,9 +83,9 @@ static std::string FileProjectRelativePath(cmMakefile* makefile, * recursive STATIC_LIBRARY dependencies depends on targetOrigin * (STATIC_LIBRARY cycle). */ -static bool StaticLibraryCycle(cmGeneratorTarget const* targetOrigin, - cmGeneratorTarget const* targetDepend, - std::string const& config) +bool StaticLibraryCycle(cmGeneratorTarget const* targetOrigin, + cmGeneratorTarget const* targetDepend, + std::string const& config) { bool cycle = false; if ((targetOrigin->GetType() == cmStateEnums::STATIC_LIBRARY) && @@ -120,6 +122,7 @@ static bool StaticLibraryCycle(cmGeneratorTarget const* targetOrigin, } return cycle; } +} // End of unnamed namespace cmQtAutoGenInitializer::InfoWriter::InfoWriter(std::string const& filename) { |