From 58c66393cfb999f23bfb6ff72122ecbc531434c0 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Sat, 10 Dec 2016 16:04:43 +0100 Subject: clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes --- Source/CTest/cmCTestCurl.cxx | 8 ++++---- Source/cmFileCommand.cxx | 15 ++++++--------- Source/cmServerProtocol.cxx | 19 +++++++++---------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index a3c13c4..9a90f54 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -38,8 +38,8 @@ std::string cmCTestCurl::Escape(std::string const& source) } namespace { -static size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, - void* data) +size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, + void* data) { int realsize = (int)(size * nmemb); @@ -49,8 +49,8 @@ static size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, return realsize; } -static size_t curlDebugCallback(CURL* /*unused*/, curl_infotype /*unused*/, - char* chPtr, size_t size, void* data) +size_t curlDebugCallback(CURL* /*unused*/, curl_infotype /*unused*/, + char* chPtr, size_t size, void* data) { std::vector* vec = static_cast*>(data); vec->insert(vec->end(), chPtr, chPtr + size); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 34b880e..d10c886 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2343,9 +2343,8 @@ size_t cmWriteToMemoryCallback(void* ptr, size_t size, size_t nmemb, return realsize; } -static size_t cmFileCommandCurlDebugCallback(CURL*, curl_infotype type, - char* chPtr, size_t size, - void* data) +size_t cmFileCommandCurlDebugCallback(CURL*, curl_infotype type, char* chPtr, + size_t size, void* data) { cmFileCommandVectorOfChar* vec = static_cast(data); @@ -2414,9 +2413,8 @@ private: std::string Text; }; -static int cmFileDownloadProgressCallback(void* clientp, double dltotal, - double dlnow, double ultotal, - double ulnow) +int cmFileDownloadProgressCallback(void* clientp, double dltotal, double dlnow, + double ultotal, double ulnow) { cURLProgressHelper* helper = reinterpret_cast(clientp); @@ -2433,9 +2431,8 @@ static int cmFileDownloadProgressCallback(void* clientp, double dltotal, return 0; } -static int cmFileUploadProgressCallback(void* clientp, double dltotal, - double dlnow, double ultotal, - double ulnow) +int cmFileUploadProgressCallback(void* clientp, double dltotal, double dlnow, + double ultotal, double ulnow) { cURLProgressHelper* helper = reinterpret_cast(clientp); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index c08a36b..f47cb33 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -32,7 +32,7 @@ namespace { -static std::vector getConfigurations(const cmake* cm) +std::vector getConfigurations(const cmake* cm) { std::vector configurations; auto makefiles = cm->GetGlobalGenerator()->GetMakefiles(); @@ -47,7 +47,7 @@ static std::vector getConfigurations(const cmake* cm) return configurations; } -static bool hasString(const Json::Value& v, const std::string& s) +bool hasString(const Json::Value& v, const std::string& s) { return !v.isNull() && std::find_if(v.begin(), v.end(), [s](const Json::Value& i) { @@ -56,7 +56,7 @@ static bool hasString(const Json::Value& v, const std::string& s) } template -static Json::Value fromStringList(const T& in) +Json::Value fromStringList(const T& in) { Json::Value result = Json::arrayValue; for (const std::string& i : in) { @@ -65,7 +65,7 @@ static Json::Value fromStringList(const T& in) return result; } -static std::vector toStringList(const Json::Value& in) +std::vector toStringList(const Json::Value& in) { std::vector result; for (const auto& it : in) { @@ -74,12 +74,11 @@ static std::vector toStringList(const Json::Value& in) return result; } -static void getCMakeInputs(const cmGlobalGenerator* gg, - const std::string& sourceDir, - const std::string& buildDir, - std::vector* internalFiles, - std::vector* explicitFiles, - std::vector* tmpFiles) +void getCMakeInputs(const cmGlobalGenerator* gg, const std::string& sourceDir, + const std::string& buildDir, + std::vector* internalFiles, + std::vector* explicitFiles, + std::vector* tmpFiles) { const std::string cmakeRootDir = cmSystemTools::GetCMakeRoot() + '/'; std::vector const& makefiles = gg->GetMakefiles(); -- cgit v0.12