diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 23:04:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 14:03:50 (GMT) |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmSetPropertyCommand.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2 |
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Diffstat (limited to 'Source/cmSetPropertyCommand.cxx')
-rw-r--r-- | Source/cmSetPropertyCommand.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 84c7610..5f970f8 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -66,7 +66,7 @@ bool cmSetPropertyCommand cmOStringStream e; e << "given invalid scope " << *arg << ". " << "Valid scopes are GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, CACHE."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -114,7 +114,7 @@ bool cmSetPropertyCommand { cmOStringStream e; e << "given invalid argument \"" << *arg << "\"."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -262,7 +262,7 @@ bool cmSetPropertyCommand::HandleTargetMode() cmOStringStream e; e << "could not find TARGET " << *ni << ". Perhaps it has not yet been created."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -301,7 +301,7 @@ bool cmSetPropertyCommand::HandleSourceMode() ni != this->Names.end(); ++ni) { // Get the source file. - if(cmSourceFile* sf = this->Makefile->GetOrCreateSource(ni->c_str())) + if(cmSourceFile* sf = this->Makefile->GetOrCreateSource(*ni)) { if(!this->HandleSource(sf)) { @@ -312,7 +312,7 @@ bool cmSetPropertyCommand::HandleSourceMode() { cmOStringStream e; e << "given SOURCE name that could not be found or created: " << *ni; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -351,7 +351,7 @@ bool cmSetPropertyCommand::HandleTestMode() { next = ni; ++next; - if(cmTest* test = this->Makefile->GetTest(ni->c_str())) + if(cmTest* test = this->Makefile->GetTest(*ni)) { if(this->HandleTest(test)) { @@ -374,7 +374,7 @@ bool cmSetPropertyCommand::HandleTestMode() { e << " " << *ni << "\n"; } - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } return true; @@ -414,7 +414,7 @@ bool cmSetPropertyCommand::HandleCacheMode() cmOStringStream e; e << "given non-boolean value \"" << this->PropertyValue << "\" for CACHE property \"ADVANCED\". "; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -424,7 +424,7 @@ bool cmSetPropertyCommand::HandleCacheMode() { cmOStringStream e; e << "given invalid CACHE entry TYPE \"" << this->PropertyValue << "\""; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } @@ -436,7 +436,7 @@ bool cmSetPropertyCommand::HandleCacheMode() e << "given invalid CACHE property " << this->PropertyName << ". " << "Settable CACHE properties are: " << "ADVANCED, HELPSTRING, STRINGS, TYPE, and VALUE."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -460,7 +460,7 @@ bool cmSetPropertyCommand::HandleCacheMode() cmOStringStream e; e << "could not find CACHE variable " << *ni << ". Perhaps it has not yet been created."; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } } |