summaryrefslogtreecommitdiffstats
path: root/Source/cmIDEOptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmIDEOptions.cxx')
-rw-r--r--Source/cmIDEOptions.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index c09aa46..9468d4a 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -20,15 +20,13 @@ cmIDEOptions::cmIDEOptions()
this->AllowDefine = true;
this->DoingInclude = false;
this->AllowSlash = false;
- this->DoingFollowing = 0;
- for (int i = 0; i < FlagTableCount; ++i) {
- this->FlagTable[i] = 0;
+ this->DoingFollowing = nullptr;
+ for (auto& flag : this->FlagTable) {
+ flag = nullptr;
}
}
-cmIDEOptions::~cmIDEOptions()
-{
-}
+cmIDEOptions::~cmIDEOptions() = default;
void cmIDEOptions::HandleFlag(std::string const& flag)
{
@@ -49,7 +47,7 @@ void cmIDEOptions::HandleFlag(std::string const& flag)
// If the last option expected a following value, this is it.
if (this->DoingFollowing) {
this->FlagMapUpdate(this->DoingFollowing, flag);
- this->DoingFollowing = 0;
+ this->DoingFollowing = nullptr;
return;
}
@@ -248,8 +246,7 @@ bool cmIDEOptions::HasFlag(std::string const& flag) const
const char* cmIDEOptions::GetFlag(std::string const& flag) const
{
// This method works only for single-valued flags!
- std::map<std::string, FlagValue>::const_iterator i =
- this->FlagMap.find(flag);
+ auto i = this->FlagMap.find(flag);
if (i != this->FlagMap.cend() && i->second.size() == 1) {
return i->second[0].c_str();
}