From 270eb96df05b93023cdd3d3a186b44b4ece1d655 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 10 Feb 2014 00:21:34 -0500 Subject: 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. --- Source/cmGraphVizWriter.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Source/cmGraphVizWriter.cxx') diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 6173d219ad..22cba899b6 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -121,7 +121,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); - cmStdString ignoreTargetsRegexes; + std::string ignoreTargetsRegexes; __set_if_set(ignoreTargetsRegexes, "GRAPHVIZ_IGNORE_TARGETS"); this->TargetsToIgnoreRegex.clear(); @@ -135,7 +135,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, itvIt != ignoreTargetsRegExVector.end(); ++ itvIt ) { - cmStdString currentRegexString(*itvIt); + std::string currentRegexString(*itvIt); cmsys::RegularExpression currentRegex; if (!currentRegex.compile(currentRegexString.c_str())) { @@ -160,7 +160,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -211,7 +211,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -265,7 +265,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName) std::set insertedConnections; std::set insertedNodes; - for(std::map::const_iterator ptrIt = + for(std::map::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -305,7 +305,7 @@ void cmGraphVizWriter::WriteConnections(const std::string& targetName, std::set& insertedConnections, cmGeneratedFileStream& str) const { - std::map::const_iterator targetPtrIt = + std::map::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -331,7 +331,7 @@ void cmGraphVizWriter::WriteConnections(const std::string& targetName, ++ llit ) { const char* libName = llit->first.c_str(); - std::map::const_iterator libNameIt = + std::map::const_iterator libNameIt = this->TargetNamesNodes.find(libName); // can happen e.g. if GRAPHVIZ_TARGET_IGNORE_REGEX is used @@ -364,7 +364,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, std::set& insertedConnections, cmGeneratedFileStream& str) const { - std::map::const_iterator targetPtrIt = + std::map::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -383,7 +383,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, std::string myNodeName = this->TargetNamesNodes.find(targetName)->second; // now search who links against me - for(std::map::const_iterator dependerIt = + for(std::map::const_iterator dependerIt = this->TargetPtrs.begin(); dependerIt != this->TargetPtrs.end(); ++dependerIt) @@ -411,7 +411,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, if (libName == targetName) { // So this target links against targetName. - std::map::const_iterator dependerNodeNameIt = + std::map::const_iterator dependerNodeNameIt = this->TargetNamesNodes.find(dependerIt->first); if(dependerNodeNameIt != this->TargetNamesNodes.end()) @@ -452,7 +452,7 @@ void cmGraphVizWriter::WriteNode(const std::string& targetName, if (insertedNodes.find(targetName) == insertedNodes.end()) { insertedNodes.insert(targetName); - std::map::const_iterator nameIt = + std::map::const_iterator nameIt = this->TargetNamesNodes.find(targetName); str << " \"" << nameIt->second.c_str() << "\" [ label=\"" @@ -540,7 +540,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt) continue; } - std::map::const_iterator tarIt = + std::map::const_iterator tarIt = this->TargetPtrs.find(libName); if ( tarIt == this->TargetPtrs.end() ) { -- cgit v1.2.1