Commit 95d3598e authored by Brad King's avatar Brad King

cmGeneratorExpressionDAGChecker: Avoid const_cast

Make a member mutable to avoid casting away const of a whole object.
parent ac000e29
......@@ -68,9 +68,7 @@ void cmGeneratorExpressionDAGChecker::Initialize()
return;
}
}
const_cast<cmGeneratorExpressionDAGChecker*>(top)
->Seen[this->Target]
.insert(this->Property);
top->Seen[this->Target].insert(this->Property);
}
}
......
......@@ -88,7 +88,7 @@ private:
const cmGeneratorExpressionDAGChecker* const Parent;
cmGeneratorTarget const* Target;
const std::string Property;
std::map<cmGeneratorTarget const*, std::set<std::string>> Seen;
mutable std::map<cmGeneratorTarget const*, std::set<std::string>> Seen;
const GeneratorExpressionContent* const Content;
const cmListFileBacktrace Backtrace;
Result CheckResult;
......
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