Bläddra i källkod

clang-tidy: fix `readability-static-accessed-through-instance` lints

Ben Boeckel 2 år sedan
förälder
incheckning
64c0702f91

+ 2 - 1
Source/cmGlobalVisualStudio10Generator.cxx

@@ -501,7 +501,8 @@ bool cmGlobalVisualStudio10Generator::InitializeWindowsStore(cmMakefile* mf)
 
 bool cmGlobalVisualStudio10Generator::InitializeTegraAndroid(cmMakefile* mf)
 {
-  std::string v = this->GetInstalledNsightTegraVersion();
+  std::string v =
+    cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion();
   if (v.empty()) {
     mf->IssueMessage(MessageType::FATAL_ERROR,
                      "CMAKE_SYSTEM_NAME is 'Android' but "

+ 3 - 1
Source/cmGlobalVisualStudio71Generator.cxx

@@ -169,7 +169,9 @@ void cmGlobalVisualStudio71Generator::WriteExternalProject(
 {
   fout << "Project(\"{"
        << (typeGuid ? typeGuid
-                    : std::string(this->ExternalProjectType(location)))
+                    : std::string(
+                        cmGlobalVisualStudio71Generator::ExternalProjectType(
+                          location)))
        << "}\") = \"" << name << "\", \""
        << this->ConvertToSolutionPath(location) << "\", \"{"
        << this->GetGUID(name) << "}\"\n";

+ 3 - 2
Source/cmGlobalVisualStudio7Generator.cxx

@@ -378,7 +378,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
         // On VS 19 and above, always map .NET SDK projects to "Any CPU".
         if (target->IsDotNetSdkTarget() &&
             this->GetVersion() >= VSVersion::VS16 &&
-            !this->IsReservedTarget(target->GetName())) {
+            !cmGlobalVisualStudio7Generator::IsReservedTarget(
+              target->GetName())) {
           mapping = "Any CPU";
         }
         this->WriteProjectConfigurations(fout, *vcprojName, *target, configs,
@@ -515,7 +516,7 @@ std::string cmGlobalVisualStudio7Generator::ConvertToSolutionPath(
   // use windows slashes.
   std::string d = path;
   std::string::size_type pos = 0;
-  while ((pos = d.find('/', pos)) != d.npos) {
+  while ((pos = d.find('/', pos)) != std::string::npos) {
     d[pos++] = '\\';
   }
   return d;

+ 2 - 1
Source/cmGlobalVisualStudio8Generator.cxx

@@ -44,7 +44,8 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
 {
   this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
   this->Name = name;
-  this->ExtraFlagTable = this->GetExtraFlagTableVS8();
+  this->ExtraFlagTable =
+    cmGlobalVisualStudio8Generator::GetExtraFlagTableVS8();
 }
 
 std::string cmGlobalVisualStudio8Generator::FindDevEnvCommand()

+ 5 - 5
Source/cmVisualStudioSlnParser.cxx

@@ -541,7 +541,7 @@ bool cmVisualStudioSlnParser::ParseMultiValueTag(const std::string& line,
   auto fullTag = cm::string_view(line).substr(0, idxEqualSign);
   if (!this->ParseTag(fullTag, parsedLine, state))
     return false;
-  if (idxEqualSign != line.npos) {
+  if (idxEqualSign != std::string::npos) {
     size_t idxFieldStart = idxEqualSign + 1;
     if (idxFieldStart < line.size()) {
       size_t idxParsing = idxFieldStart;
@@ -549,7 +549,7 @@ bool cmVisualStudioSlnParser::ParseMultiValueTag(const std::string& line,
       for (;;) {
         idxParsing = line.find_first_of(",\"", idxParsing);
         bool fieldOver = false;
-        if (idxParsing == line.npos) {
+        if (idxParsing == std::string::npos) {
           fieldOver = true;
           if (inQuotes) {
             this->LastResult.SetError(ResultErrorInputStructure,
@@ -565,7 +565,7 @@ bool cmVisualStudioSlnParser::ParseMultiValueTag(const std::string& line,
                 line.substr(idxFieldStart, idxParsing - idxFieldStart),
                 parsedLine))
             return false;
-          if (idxParsing == line.npos)
+          if (idxParsing == std::string::npos)
             break; // end of last field
           idxFieldStart = idxParsing + 1;
         }
@@ -584,7 +584,7 @@ bool cmVisualStudioSlnParser::ParseSingleValueTag(const std::string& line,
   auto fullTag = cm::string_view(line).substr(0, idxEqualSign);
   if (!this->ParseTag(fullTag, parsedLine, state))
     return false;
-  if (idxEqualSign != line.npos) {
+  if (idxEqualSign != std::string::npos) {
     if (!this->ParseValue(line.substr(idxEqualSign + 1), parsedLine))
       return false;
   }
@@ -596,7 +596,7 @@ bool cmVisualStudioSlnParser::ParseKeyValuePair(const std::string& line,
                                                 State& /*state*/)
 {
   size_t idxEqualSign = line.find('=');
-  if (idxEqualSign == line.npos) {
+  if (idxEqualSign == std::string::npos) {
     parsedLine.CopyVerbatim(line);
     return true;
   }