From af75ab7645545bc046d18c8af48f3198a9de4080 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 4 Jul 2019 23:05:24 +0300 Subject: Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx` Signed-off-by: Alex Turbov --- Source/CPack/cpack.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 58b9e70..3edcbaf 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -29,19 +29,20 @@ #include "cmSystemTools.h" #include "cmake.h" -static const char* cmDocumentationName[][2] = { +namespace { +const char* cmDocumentationName[][2] = { { nullptr, " cpack - Packaging driver provided by CMake." }, { nullptr, nullptr } }; -static const char* cmDocumentationUsage[][2] = { +const char* cmDocumentationUsage[][2] = { // clang-format off { nullptr, " cpack [options]" }, { nullptr, nullptr } // clang-format on }; -static const char* cmDocumentationOptions[][2] = { +const char* cmDocumentationOptions[][2] = { { "-G ", "Override/define CPACK_GENERATOR" }, { "-C ", "Specify the project configuration" }, { "-D =", "Set a CPack variable." }, @@ -90,10 +91,11 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, return 1; } -static void cpackProgressCallback(const std::string& message, float /*unused*/) +void cpackProgressCallback(const std::string& message, float /*unused*/) { std::cout << "-- " << message << std::endl; } +} // namespace // this is CPack. int main(int argc, char const* const* argv) -- cgit v0.12