2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-30 16:27:47 +00:00

refactor: fix additional zcg x64 warnings

This commit is contained in:
Jan
2025-04-28 11:54:51 +01:00
parent d938f91541
commit 3adbe5a275
12 changed files with 124 additions and 130 deletions

View File

@@ -191,7 +191,7 @@ std::unique_ptr<ISimpleExpression> SimpleExpressionMatchers::ProcessExpression(S
if (operationIndex < 0 || operationIndex >= static_cast<int>(SimpleBinaryOperationId::COUNT))
throw ParsingException(TokenPos(), "Invalid binary operation id @ Expression");
operators.emplace_back(operators.size(), SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES[operationIndex]);
operators.emplace_back(static_cast<unsigned>(operators.size()), SimpleExpressionBinaryOperationType::ALL_OPERATION_TYPES[operationIndex]);
}
else
break;

View File

@@ -10,17 +10,17 @@ class SimpleMatcherFactory : public AbstractMatcherFactory<SimpleParserValue>
public:
explicit SimpleMatcherFactory(const IMatcherForLabelSupplier<SimpleParserValue>* labelSupplier);
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Type(SimpleParserValueType type) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Keyword(std::string value) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> KeywordIgnoreCase(std::string value) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> KeywordPrefix(std::string value) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Identifier() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> String() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Integer() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> IntegerWithSign() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> FloatingPoint() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> FloatingPointWithSign() const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> Char(char c) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> MultiChar(int multiCharacterSequenceId) const;
_NODISCARD MatcherFactoryWrapper<SimpleParserValue> AnyCharBesides(std::vector<char> chars) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Type(SimpleParserValueType type) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Keyword(std::string value) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> KeywordIgnoreCase(std::string value) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> KeywordPrefix(std::string value) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Identifier() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> String() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Integer() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> IntegerWithSign() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> FloatingPoint() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> FloatingPointWithSign() const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> Char(char c) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> MultiChar(int multiCharacterSequenceId) const;
[[nodiscard]] MatcherFactoryWrapper<SimpleParserValue> AnyCharBesides(std::vector<char> chars) const;
};

View File

@@ -79,7 +79,7 @@ bool SimpleLexer::ReadMultiCharacterToken(const MultiCharacterTokenLookupEntry*
linePos++;
}
m_current_line_offset = m_current_line_offset - 1 + multiTokenLookup->m_value.size();
m_current_line_offset = m_current_line_offset - 1 + static_cast<unsigned>(multiTokenLookup->m_value.size());
return true;
}