diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-04 02:20:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:30 (GMT) |
commit | ce5114354c357df973e54872ab7abebbff36793b (patch) | |
tree | 472c096db98ba5b36c7c32910a334a044ecafd80 /Source/cmExtraSublimeTextGenerator.cxx | |
parent | 83a5e453f8c0dc0fc9b6bdee9723478aafefd0da (diff) | |
download | CMake-ce5114354c357df973e54872ab7abebbff36793b.zip CMake-ce5114354c357df973e54872ab7abebbff36793b.tar.gz CMake-ce5114354c357df973e54872ab7abebbff36793b.tar.bz2 |
stringapi: Use strings for the languages
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r-- | Source/cmExtraSublimeTextGenerator.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 604bfcc..1c9ac02 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -369,8 +369,8 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source, std::string flags; cmMakefile *makefile = lg->GetMakefile(); - const char* language = source->GetLanguage(); - if (language == NULL) + std::string language = source->GetLanguage(); + if (language.empty()) { language = "C"; } @@ -423,11 +423,7 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target, { std::set<std::string> defines; cmMakefile *makefile = lg->GetMakefile(); - const char* language = source->GetLanguage(); - if (language == NULL) - { - language = ""; - } + const std::string& language = source->GetLanguage(); const char* config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); // Add the export symbol definition for shared library objects. |