diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-10 05:21:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:35 (GMT) |
commit | 270eb96df05b93023cdd3d3a186b44b4ece1d655 (patch) | |
tree | 25d3037b5412b24242c631cccfe36e16a0fa8e1c /Source/cmOrderDirectories.cxx | |
parent | 215b1addf09359507281359cd7d478c61c01a9f2 (diff) | |
download | CMake-270eb96df05b93023cdd3d3a186b44b4ece1d655.zip CMake-270eb96df05b93023cdd3d3a186b44b4ece1d655.tar.gz CMake-270eb96df05b93023cdd3d3a186b44b4ece1d655.tar.bz2 |
strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.
The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
Diffstat (limited to 'Source/cmOrderDirectories.cxx')
-rw-r--r-- | Source/cmOrderDirectories.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 86beb97..79677e3 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -138,9 +138,9 @@ bool cmOrderDirectoriesConstraint::FileMayConflict(std::string const& dir, } // Check if the file will be built by cmake. - std::set<cmStdString> const& files = + std::set<std::string> const& files = (this->GlobalGenerator->GetDirectoryContent(dir, false)); - std::set<cmStdString>::const_iterator fi = files.find(name); + std::set<std::string>::const_iterator fi = files.find(name); return fi != files.end(); } @@ -200,7 +200,7 @@ bool cmOrderDirectoriesConstraintSOName::FindConflict(std::string const& dir) { // We do not have the soname. Look for files in the directory // that may conflict. - std::set<cmStdString> const& files = + std::set<std::string> const& files = (this->GlobalGenerator ->GetDirectoryContent(dir, true)); @@ -208,9 +208,9 @@ bool cmOrderDirectoriesConstraintSOName::FindConflict(std::string const& dir) // know the soname just look at all files that start with the // file name. Usually the soname starts with the library name. std::string base = this->FileName; - std::set<cmStdString>::const_iterator first = files.lower_bound(base); + std::set<std::string>::const_iterator first = files.lower_bound(base); ++base[base.size()-1]; - std::set<cmStdString>::const_iterator last = files.upper_bound(base); + std::set<std::string>::const_iterator last = files.upper_bound(base); if(first != last) { return true; @@ -251,8 +251,8 @@ bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir) if(!this->OD->LinkExtensions.empty() && this->OD->RemoveLibraryExtension.find(this->FileName)) { - cmStdString lib = this->OD->RemoveLibraryExtension.match(1); - cmStdString ext = this->OD->RemoveLibraryExtension.match(2); + std::string lib = this->OD->RemoveLibraryExtension.match(1); + std::string ext = this->OD->RemoveLibraryExtension.match(2); for(std::vector<std::string>::iterator i = this->OD->LinkExtensions.begin(); i != this->OD->LinkExtensions.end(); ++i) @@ -407,7 +407,7 @@ cmOrderDirectories //---------------------------------------------------------------------------- void cmOrderDirectories -::SetImplicitDirectories(std::set<cmStdString> const& implicitDirs) +::SetImplicitDirectories(std::set<std::string> const& implicitDirs) { this->ImplicitDirectories = implicitDirs; } @@ -444,11 +444,11 @@ void cmOrderDirectories::CollectOriginalDirectories() int cmOrderDirectories::AddOriginalDirectory(std::string const& dir) { // Add the runtime directory with a unique index. - std::map<cmStdString, int>::iterator i = + std::map<std::string, int>::iterator i = this->DirectoryIndex.find(dir); if(i == this->DirectoryIndex.end()) { - std::map<cmStdString, int>::value_type + std::map<std::string, int>::value_type entry(dir, static_cast<int>(this->OriginalDirectories.size())); i = this->DirectoryIndex.insert(entry).first; this->OriginalDirectories.push_back(dir); |