summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-12-10 15:04:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-12 19:04:15 (GMT)
commit58c66393cfb999f23bfb6ff72122ecbc531434c0 (patch)
tree2a5128546d94cf74b4800c8bd43e8b0f996bd21d
parent85bfdddaf75905a2c075d2a94d85f4bcfa1feea9 (diff)
downloadCMake-58c66393cfb999f23bfb6ff72122ecbc531434c0.zip
CMake-58c66393cfb999f23bfb6ff72122ecbc531434c0.tar.gz
CMake-58c66393cfb999f23bfb6ff72122ecbc531434c0.tar.bz2
clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes
-rw-r--r--Source/CTest/cmCTestCurl.cxx8
-rw-r--r--Source/cmFileCommand.cxx15
-rw-r--r--Source/cmServerProtocol.cxx19
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<char>* vec = static_cast<std::vector<char>*>(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<cmFileCommandVectorOfChar*>(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<cURLProgressHelper*>(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<cURLProgressHelper*>(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<std::string> getConfigurations(const cmake* cm)
+std::vector<std::string> getConfigurations(const cmake* cm)
{
std::vector<std::string> configurations;
auto makefiles = cm->GetGlobalGenerator()->GetMakefiles();
@@ -47,7 +47,7 @@ static std::vector<std::string> 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 <class T>
-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<std::string> toStringList(const Json::Value& in)
+std::vector<std::string> toStringList(const Json::Value& in)
{
std::vector<std::string> result;
for (const auto& it : in) {
@@ -74,12 +74,11 @@ static std::vector<std::string> toStringList(const Json::Value& in)
return result;
}
-static void getCMakeInputs(const cmGlobalGenerator* gg,
- const std::string& sourceDir,
- const std::string& buildDir,
- std::vector<std::string>* internalFiles,
- std::vector<std::string>* explicitFiles,
- std::vector<std::string>* tmpFiles)
+void getCMakeInputs(const cmGlobalGenerator* gg, const std::string& sourceDir,
+ const std::string& buildDir,
+ std::vector<std::string>* internalFiles,
+ std::vector<std::string>* explicitFiles,
+ std::vector<std::string>* tmpFiles)
{
const std::string cmakeRootDir = cmSystemTools::GetCMakeRoot() + '/';
std::vector<cmMakefile*> const& makefiles = gg->GetMakefiles();