summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2024-01-15 00:14:57 (GMT)
committermakise-homura <akemi_homura@kurisa.ch>2024-01-16 19:11:02 (GMT)
commit9bc2aba3b4abb55233026e9e4e9093392845bf76 (patch)
treecbef5c9bfcfd4c925d54c4467757c866ee5c5c12 /Source/cmSystemTools.cxx
parent25ab83305208abd0b5f89f18ba298a87b7733c58 (diff)
downloadCMake-9bc2aba3b4abb55233026e9e4e9093392845bf76.zip
CMake-9bc2aba3b4abb55233026e9e4e9093392845bf76.tar.gz
CMake-9bc2aba3b4abb55233026e9e4e9093392845bf76.tar.bz2
LCC: get rid of ambiguous assignments of {} for LCC
LCC 1.21 can't determine the exact type of right side of assignment and so produces an error. Here it is resolved by an intermediate variable.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f606c22..1b3dbe2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1673,7 +1673,7 @@ void cmSystemTools::EnvDiff::PutEnv(const std::string& env)
void cmSystemTools::EnvDiff::UnPutEnv(const std::string& env)
{
- diff[env] = {};
+ diff[env] = cm::nullopt;
}
bool cmSystemTools::EnvDiff::ParseOperation(const std::string& envmod)
@@ -1728,7 +1728,7 @@ bool cmSystemTools::EnvDiff::ParseOperation(const std::string& envmod)
} else if (op == "set"_s) {
diff[name] = value;
} else if (op == "unset"_s) {
- diff[name] = {};
+ diff[name] = cm::nullopt;
} else if (op == "string_append"_s) {
apply_diff(name, [&value](std::string& output) { output += value; });
} else if (op == "string_prepend"_s) {