diff options
author | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 12:32:36 (GMT) |
---|---|---|
committer | Oleksandr Koval <oleksandr.koval.dev@gmail.com> | 2021-01-05 12:32:36 (GMT) |
commit | 209daa20b2bd2ee2a76e70af58e895647f7e284f (patch) | |
tree | 081f3192927b19325f40c0da459a11e5b5a5784b /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | 764ce15ffbe232347a41e40509a2e485bae226f6 (diff) | |
download | CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.zip CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.tar.gz CMake-209daa20b2bd2ee2a76e70af58e895647f7e284f.tar.bz2 |
Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 87b8f9b..800db8a 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -112,10 +112,10 @@ void Tree::InsertPath(const std::vector<std::string>& split, const std::string& fileName) { if (start == split.size()) { - files.insert(fileName); + this->files.insert(fileName); return; } - for (Tree& folder : folders) { + for (Tree& folder : this->folders) { if (folder.path == split[start]) { if (start + 1 < split.size()) { folder.InsertPath(split, start + 1, fileName); @@ -131,19 +131,19 @@ void Tree::InsertPath(const std::vector<std::string>& split, newFolder.path = split[start]; if (start + 1 < split.size()) { newFolder.InsertPath(split, start + 1, fileName); - folders.push_back(newFolder); + this->folders.push_back(newFolder); return; } // last part of split newFolder.files.insert(fileName); - folders.push_back(newFolder); + this->folders.push_back(newFolder); } void Tree::BuildVirtualFolder(cmXMLWriter& xml) const { xml.StartElement("Option"); std::string virtualFolders = "CMake Files\\;"; - for (Tree const& folder : folders) { + for (Tree const& folder : this->folders) { folder.BuildVirtualFolderImpl(virtualFolders, ""); } xml.Attribute("virtualFolders", virtualFolders); @@ -153,15 +153,15 @@ void Tree::BuildVirtualFolder(cmXMLWriter& xml) const void Tree::BuildVirtualFolderImpl(std::string& virtualFolders, const std::string& prefix) const { - virtualFolders += "CMake Files\\" + prefix + path + "\\;"; - for (Tree const& folder : folders) { - folder.BuildVirtualFolderImpl(virtualFolders, prefix + path + "\\"); + virtualFolders += "CMake Files\\" + prefix + this->path + "\\;"; + for (Tree const& folder : this->folders) { + folder.BuildVirtualFolderImpl(virtualFolders, prefix + this->path + "\\"); } } void Tree::BuildUnit(cmXMLWriter& xml, const std::string& fsPath) const { - for (std::string const& f : files) { + for (std::string const& f : this->files) { xml.StartElement("Unit"); xml.Attribute("filename", fsPath + f); @@ -171,7 +171,7 @@ void Tree::BuildUnit(cmXMLWriter& xml, const std::string& fsPath) const xml.EndElement(); } - for (Tree const& folder : folders) { + for (Tree const& folder : this->folders) { folder.BuildUnitImpl(xml, "", fsPath); } } @@ -180,20 +180,21 @@ void Tree::BuildUnitImpl(cmXMLWriter& xml, const std::string& virtualFolderPath, const std::string& fsPath) const { - for (std::string const& f : files) { + for (std::string const& f : this->files) { xml.StartElement("Unit"); - xml.Attribute("filename", cmStrCat(fsPath, path, "/", f)); + xml.Attribute("filename", cmStrCat(fsPath, this->path, "/", f)); xml.StartElement("Option"); - xml.Attribute("virtualFolder", - cmStrCat("CMake Files\\", virtualFolderPath, path, "\\")); + xml.Attribute( + "virtualFolder", + cmStrCat("CMake Files\\", virtualFolderPath, this->path, "\\")); xml.EndElement(); xml.EndElement(); } - for (Tree const& folder : folders) { - folder.BuildUnitImpl(xml, cmStrCat(virtualFolderPath, path, "\\"), - cmStrCat(fsPath, path, "/")); + for (Tree const& folder : this->folders) { + folder.BuildUnitImpl(xml, cmStrCat(virtualFolderPath, this->path, "\\"), + cmStrCat(fsPath, this->path, "/")); } } |