Commit 58c66393 authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by Brad King
Browse files

clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes

parent 85bfddda
......@@ -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);
......
......@@ -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);
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment