From d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 10 Mar 2014 13:53:57 -0400 Subject: cmCustomCommand: Return std::string from GetWorkingDirectory --- Source/cmLocalVisualStudioGenerator.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/cmLocalVisualStudioGenerator.cxx') diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 6e93d22c25..3075c15672 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -84,9 +84,9 @@ cmLocalVisualStudioGenerator const std::string& newline_text) { bool useLocal = this->CustomCommandUseLocal(); - const char* workingDirectory = cc.GetWorkingDirectory(); + std::string workingDirectory = cc.GetWorkingDirectory(); cmCustomCommandGenerator ccg(cc, configName, this->Makefile); - RelativeRoot relativeRoot = workingDirectory? NONE : START_OUTPUT; + RelativeRoot relativeRoot = workingDirectory.empty()? START_OUTPUT : NONE; // Avoid leading or trailing newlines. std::string newline = ""; @@ -114,7 +114,7 @@ cmLocalVisualStudioGenerator script += "setlocal"; } - if(workingDirectory) + if(!workingDirectory.empty()) { // Change the working directory. script += newline; @@ -124,7 +124,7 @@ cmLocalVisualStudioGenerator script += check_error; // Change the working drive. - if(workingDirectory[0] && workingDirectory[1] == ':') + if(workingDirectory.size() > 1 && workingDirectory[1] == ':') { script += newline; newline = newline_text; -- cgit v1.2.1