mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
cmGeneratorExpressionDAGChecker: Avoid const_cast
Make a member mutable to avoid casting away const of a whole object.
This commit is contained in:
1 parent
ac000e29da
commit
95d3598e04
2 files changed
+2
-4
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user