summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-04 20:56:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-07 19:37:38 (GMT)
commitd9fde87d1a3a4de382d664bd121af957af6eaaea (patch)
tree872ba758493ab64773a3a8b37a46e41e92bd7b2d /Source/cmLocalNinjaGenerator.cxx
parentd92c160db333bf65e52da1cb73a068b5d3f1db4f (diff)
downloadCMake-d9fde87d1a3a4de382d664bd121af957af6eaaea.zip
CMake-d9fde87d1a3a4de382d664bd121af957af6eaaea.tar.gz
CMake-d9fde87d1a3a4de382d664bd121af957af6eaaea.tar.bz2
Ninja: Replace array access with local variable
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index eb48653..22fae4c 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -488,13 +488,13 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
std::string output;
const std::vector<std::string>& outputs = ccg.GetOutputs();
if (!outputs.empty()) {
+ output = outputs[0];
if (ccg.GetWorkingDirectory().empty()) {
- output = this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(),
- outputs[0]);
+ output =
+ this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output);
output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
} else {
- output =
- this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL);
+ output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
}
}
vars.Output = output.c_str();