From c637e0c53b5b81d6605018bd64ea2769f356662a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 9 Oct 2016 10:47:45 +0200 Subject: [PATCH] cmMakefile: Return a string from GetDefineFlags Flip condition in GHS for readability. --- Source/cmGhsMultiTargetGenerator.cxx | 2 +- Source/cmMakefile.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 959dfdbdce..fac68f5626 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -244,7 +244,7 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config, flags, this->GeneratorTarget, lang); // Append old-style preprocessor definition flags. - if (std::string(" ") != std::string(this->Makefile->GetDefineFlags())) { + if (this->Makefile->GetDefineFlags() != " ") { this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 40344ceba5..de7beadca8 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -447,7 +447,7 @@ public: /** * Get a list of preprocessor define flags. */ - const char* GetDefineFlags() const { return this->DefineFlags.c_str(); } + std::string GetDefineFlags() const { return this->DefineFlags; } /** * Make sure CMake can write this file