summaryrefslogtreecommitdiffstats
path: root/Source/cmGraphVizWriter.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-10 05:21:34 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:35 (GMT)
commit270eb96df05b93023cdd3d3a186b44b4ece1d655 (patch)
tree25d3037b5412b24242c631cccfe36e16a0fa8e1c /Source/cmGraphVizWriter.cxx
parent215b1addf09359507281359cd7d478c61c01a9f2 (diff)
downloadCMake-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/cmGraphVizWriter.cxx')
-rw-r--r--Source/cmGraphVizWriter.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 6173d21..22cba89 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<cmStdString, const cmTarget*>::const_iterator ptrIt =
+ for(std::map<std::string, const cmTarget*>::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<cmStdString, const cmTarget*>::const_iterator ptrIt =
+ for(std::map<std::string, const cmTarget*>::const_iterator ptrIt =
this->TargetPtrs.begin();
ptrIt != this->TargetPtrs.end();
++ptrIt)
@@ -265,7 +265,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName)
std::set<std::string> insertedConnections;
std::set<std::string> insertedNodes;
- for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt =
+ for(std::map<std::string, const cmTarget*>::const_iterator ptrIt =
this->TargetPtrs.begin();
ptrIt != this->TargetPtrs.end();
++ptrIt)
@@ -305,7 +305,7 @@ void cmGraphVizWriter::WriteConnections(const std::string& targetName,
std::set<std::string>& insertedConnections,
cmGeneratedFileStream& str) const
{
- std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt =
+ std::map<std::string, const cmTarget* >::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<cmStdString, cmStdString>::const_iterator libNameIt =
+ std::map<std::string, std::string>::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<std::string>& insertedConnections,
cmGeneratedFileStream& str) const
{
- std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt =
+ std::map<std::string, const cmTarget* >::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<cmStdString, const cmTarget*>::const_iterator dependerIt =
+ for(std::map<std::string, const cmTarget*>::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<cmStdString, cmStdString>::const_iterator dependerNodeNameIt =
+ std::map<std::string, std::string>::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<cmStdString, cmStdString>::const_iterator nameIt =
+ std::map<std::string, std::string>::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<cmStdString, const cmTarget*>::const_iterator tarIt =
+ std::map<std::string, const cmTarget*>::const_iterator tarIt =
this->TargetPtrs.find(libName);
if ( tarIt == this->TargetPtrs.end() )
{