From 807aa8e35382ab55120ccb1e6ae88523ad7ee5a3 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Tue, 23 Aug 2022 21:21:40 +0400 Subject: CMakeSetup.cxx: Use anonymous namespace instead of `static` --- Source/QtDialog/CMakeSetup.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index a15ec81..3113d64 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -22,11 +22,12 @@ #include "cmSystemTools.h" // IWYU pragma: keep #include "cmake.h" -static const char* cmDocumentationName[][2] = { { nullptr, - " cmake-gui - CMake GUI." }, - { nullptr, nullptr } }; +namespace { +const char* cmDocumentationName[][2] = { { nullptr, + " cmake-gui - CMake GUI." }, + { nullptr, nullptr } }; -static const char* cmDocumentationUsage[][2] = { +const char* cmDocumentationUsage[][2] = { { nullptr, " cmake-gui [options]\n" " cmake-gui [options] \n" @@ -36,12 +37,13 @@ static const char* cmDocumentationUsage[][2] = { { nullptr, nullptr } }; -static const char* cmDocumentationOptions[][2] = { +const char* cmDocumentationOptions[][2] = { { "-S ", "Explicitly specify a source directory." }, { "-B ", "Explicitly specify a build directory." }, { "--preset=", "Specify a configure preset." }, { nullptr, nullptr } }; +} // anonymous namespace #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); @@ -252,6 +254,7 @@ int main(int argc, char** argv) # include # include "cm_sys_stat.h" + static bool cmOSXInstall(std::string const& dir, std::string const& tool) { if (tool.empty()) { @@ -277,6 +280,7 @@ static bool cmOSXInstall(std::string const& dir, std::string const& tool) << "': " << strerror(err) << "\n"; return false; } + static int cmOSXInstall(std::string dir) { if (!cmHasLiteralSuffix(dir, "/")) { -- cgit v0.12