summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmListFileCache.cxx2
-rw-r--r--Source/cmListFileCache.h3
-rw-r--r--Source/cmLocalGenerator.cxx6
-rw-r--r--Source/cmLocalGenerator.h14
4 files changed, 8 insertions, 17 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index d0495f7..4689f42 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -481,7 +481,7 @@ std::ostream& operator<<(std::ostream& os, BT<std::string> const& s)
}
std::vector<BT<std::string>> ExpandListWithBacktrace(
- const char* list, cmListFileBacktrace const& bt)
+ std::string const& list, cmListFileBacktrace const& bt)
{
std::vector<BT<std::string>> result;
std::vector<std::string> tmp;
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 7c2802e..9e4a833 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -199,7 +199,8 @@ public:
std::ostream& operator<<(std::ostream& os, BT<std::string> const& s);
std::vector<BT<std::string>> ExpandListWithBacktrace(
- const char* list, cmListFileBacktrace const& bt = cmListFileBacktrace());
+ std::string const& list,
+ cmListFileBacktrace const& bt = cmListFileBacktrace());
struct cmListFile
{
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7beeb71..d5a18e6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2108,7 +2108,7 @@ void cmLocalGenerator::AppendIncludeDirectories(
}
void cmLocalGenerator::AppendDefines(std::set<std::string>& defines,
- const char* defines_list) const
+ std::string const& defines_list) const
{
std::set<BT<std::string>> tmp;
this->AppendDefines(tmp, ExpandListWithBacktrace(defines_list));
@@ -2118,10 +2118,10 @@ void cmLocalGenerator::AppendDefines(std::set<std::string>& defines,
}
void cmLocalGenerator::AppendDefines(std::set<BT<std::string>>& defines,
- const char* defines_list) const
+ std::string const& defines_list) const
{
// Short-circuit if there are no definitions.
- if (!defines_list) {
+ if (defines_list.empty()) {
return;
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 95a8a6a..3dd6929 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -169,19 +169,9 @@ public:
* command line.
*/
void AppendDefines(std::set<std::string>& defines,
- const char* defines_list) const;
- void AppendDefines(std::set<std::string>& defines,
- std::string const& defines_list) const
- {
- this->AppendDefines(defines, defines_list.c_str());
- }
+ std::string const& defines_list) const;
void AppendDefines(std::set<BT<std::string>>& defines,
- const char* defines_list) const;
- void AppendDefines(std::set<BT<std::string>>& defines,
- std::string const& defines_list) const
- {
- this->AppendDefines(defines, defines_list.c_str());
- }
+ std::string const& defines_list) const;
void AppendDefines(std::set<BT<std::string>>& defines,
const std::vector<BT<std::string>>& defines_vec) const;