Fix constness

This commit is contained in:
WarmUpTill 2025-09-22 20:18:28 +02:00 committed by WarmUpTill
parent c8e5b561ef
commit 1d412a818d
2 changed files with 4 additions and 4 deletions

View File

@ -605,7 +605,7 @@ void Macro::SetInputVariables(const MacroInputVariables &inputVariables)
_inputVariables = inputVariables;
}
std::vector<TempVariable> Macro::GetTempVars(MacroSegment *filter) const
std::vector<TempVariable> Macro::GetTempVars(const MacroSegment *filter) const
{
std::vector<TempVariable> res;
@ -633,7 +633,7 @@ std::vector<TempVariable> Macro::GetTempVars(MacroSegment *filter) const
return ptr.get() == segment;
}) != _conditions.end();
};
auto isAction = [this](MacroSegment *segment) -> bool {
auto isAction = [this](const MacroSegment *segment) -> bool {
return std::find_if(_actions.begin(), _actions.end(),
[segment](
const std::shared_ptr<MacroSegment>
@ -641,7 +641,7 @@ std::vector<TempVariable> Macro::GetTempVars(MacroSegment *filter) const
return ptr.get() == segment;
}) != _actions.end();
};
auto isElseAction = [this](MacroSegment *segment) -> bool {
auto isElseAction = [this](const MacroSegment *segment) -> bool {
return std::find_if(_elseActions.begin(), _elseActions.end(),
[segment](
const std::shared_ptr<MacroSegment>

View File

@ -88,7 +88,7 @@ public:
void SetInputVariables(const MacroInputVariables &);
// Temporary variable helpers
std::vector<TempVariable> GetTempVars(MacroSegment *filter) const;
std::vector<TempVariable> GetTempVars(const MacroSegment *filter) const;
std::optional<const TempVariable>
GetTempVar(const MacroSegment *, const std::string &id) const;
void InvalidateTempVarValues() const;