chore: replace all usages of removed ClassUtils macros

This commit is contained in:
Jan Laupetin
2026-03-06 00:13:04 +01:00
parent bc16febfe2
commit 90d7f92ddd
104 changed files with 244 additions and 405 deletions
@@ -20,6 +20,6 @@ namespace menu
std::unique_ptr<CommonEventHandlerSet> conditionElements,
std::unique_ptr<CommonEventHandlerSet> elseElements);
_NODISCARD CommonEventHandlerElementType GetType() const override;
[[nodiscard]] CommonEventHandlerElementType GetType() const override;
};
} // namespace menu
@@ -14,6 +14,6 @@ namespace menu
CommonEventHandlerScript();
explicit CommonEventHandlerScript(std::string script);
_NODISCARD CommonEventHandlerElementType GetType() const override;
[[nodiscard]] CommonEventHandlerElementType GetType() const override;
};
} // namespace menu
@@ -1,4 +1,5 @@
#pragma once
#include "ICommonEventHandlerElement.h"
#include "Parsing/Simple/Expression/ISimpleExpression.h"
@@ -26,6 +27,6 @@ namespace menu
CommonEventHandlerSetLocalVar();
CommonEventHandlerSetLocalVar(SetLocalVarType type, std::string varName, std::unique_ptr<ISimpleExpression> value);
_NODISCARD CommonEventHandlerElementType GetType() const override;
[[nodiscard]] CommonEventHandlerElementType GetType() const override;
};
} // namespace menu
@@ -1,7 +1,5 @@
#pragma once
#include "Utils/ClassUtils.h"
namespace menu
{
enum class CommonEventHandlerElementType
@@ -23,6 +21,6 @@ namespace menu
ICommonEventHandlerElement& operator=(const ICommonEventHandlerElement& other) = default;
ICommonEventHandlerElement& operator=(ICommonEventHandlerElement&& other) noexcept = default;
_NODISCARD virtual CommonEventHandlerElementType GetType() const = 0;
[[nodiscard]] virtual CommonEventHandlerElementType GetType() const = 0;
};
} // namespace menu
@@ -1,4 +1,5 @@
#pragma once
#include "Parsing/Simple/Expression/ISimpleExpression.h"
#include <vector>
@@ -14,9 +15,9 @@ namespace menu
CommonExpressionBaseFunctionCall(std::string functionName, size_t functionIndex);
_NODISCARD bool Equals(const ISimpleExpression* other) const override;
_NODISCARD bool IsStatic() const override;
_NODISCARD SimpleExpressionValue EvaluateStatic() const override;
_NODISCARD SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
[[nodiscard]] bool Equals(const ISimpleExpression* other) const override;
[[nodiscard]] bool IsStatic() const override;
[[nodiscard]] SimpleExpressionValue EvaluateStatic() const override;
[[nodiscard]] SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
};
} // namespace menu
@@ -11,9 +11,9 @@ namespace menu
explicit CommonExpressionCustomFunctionCall(std::string functionName);
_NODISCARD bool Equals(const ISimpleExpression* other) const override;
_NODISCARD bool IsStatic() const override;
_NODISCARD SimpleExpressionValue EvaluateStatic() const override;
_NODISCARD SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
[[nodiscard]] bool Equals(const ISimpleExpression* other) const override;
[[nodiscard]] bool IsStatic() const override;
[[nodiscard]] SimpleExpressionValue EvaluateStatic() const override;
[[nodiscard]] SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
};
} // namespace menu
@@ -23,21 +23,21 @@ namespace menu
public:
explicit MenuMatcherFactory(const IMatcherForLabelSupplier<SimpleParserValue>* labelSupplier);
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> StringChain() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Text() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> TextNoChain() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Numeric() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> StringChain() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Text() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> TextNoChain() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Numeric() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> TextExpression() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> IntExpression() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> NumericExpression() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> TextExpression() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> IntExpression() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> NumericExpression() const;
_NODISCARD static int TokenNumericIntValue(const SimpleParserValue& value);
_NODISCARD static double TokenNumericFloatingPointValue(const SimpleParserValue& value);
_NODISCARD static std::string& TokenTextValue(const SimpleParserValue& value);
[[nodiscard]] static int TokenNumericIntValue(const SimpleParserValue& value);
[[nodiscard]] static double TokenNumericFloatingPointValue(const SimpleParserValue& value);
[[nodiscard]] static std::string& TokenTextValue(const SimpleParserValue& value);
_NODISCARD static std::string TokenTextExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
_NODISCARD static int TokenIntExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
_NODISCARD static double TokenNumericExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
[[nodiscard]] static std::string TokenTextExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
[[nodiscard]] static int TokenIntExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
[[nodiscard]] static double TokenNumericExpressionValue(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result);
};
} // namespace menu
+1 -2
View File
@@ -5,7 +5,6 @@
#include "Parsing/Impl/AbstractParser.h"
#include "Parsing/Simple/SimpleLexer.h"
#include "Parsing/Simple/SimpleParserValue.h"
#include "Utils/ClassUtils.h"
namespace menu
{
@@ -28,6 +27,6 @@ namespace menu
public:
MenuFileParser(SimpleLexer* lexer, FeatureLevel featureLevel, bool permissiveMode);
MenuFileParser(SimpleLexer* lexer, FeatureLevel featureLevel, bool permissiveMode, const MenuAssetZoneState* zoneState);
_NODISCARD MenuFileParserState* GetState() const;
[[nodiscard]] MenuFileParserState* GetState() const;
};
} // namespace menu
@@ -31,7 +31,7 @@ namespace menu
{
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptStrictNumeric() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptStrictNumeric() const
{
return And({
MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<MenuMatcherScriptNumeric>())
@@ -64,7 +64,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptNumeric() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptNumeric() const
{
return Or({
ScriptStrictNumeric(),
@@ -81,7 +81,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptStrictInt() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptStrictInt() const
{
return And({
MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<MenuMatcherScriptInt>())
@@ -100,7 +100,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptChar(const char c) const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptChar(const char c) const
{
return Or({
Char(c),
@@ -118,7 +118,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptInt() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptInt() const
{
return Or({
ScriptStrictInt(),
@@ -136,7 +136,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptText() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptText() const
{
return Or({
Type(SimpleParserValueType::STRING),
@@ -154,12 +154,12 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptKeyword(std::string keyword) const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptKeyword(std::string keyword) const
{
return KeywordIgnoreCase(std::move(keyword));
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptColor() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptColor() const
{
return And({
ScriptStrictNumeric(),
@@ -169,7 +169,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptLocalVarIntOrLiteral() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptLocalVarIntOrLiteral() const
{
return Or({
And({
@@ -182,7 +182,7 @@ namespace menu
});
}
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> ScriptLocalVarBoolOrLiteral() const
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> ScriptLocalVarBoolOrLiteral() const
{
return Or({
And({