Commit b2c85cb6 authored by Vitaly Stakhovsky's avatar Vitaly Stakhovsky
Browse files

cmLocalGenerator::AppendDefines: Remove const char* overloads

Accept const std::string& arguments only
parent e07f1473
......@@ -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;
......
......@@ -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
{
......
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment