mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-16 18:03:03 +00:00
chore: replace all usages of removed ClassUtils macros
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionBinaryOperation.h"
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionConditionalOperator.h"
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionUnaryOperation.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/StringUtils.h"
|
||||
|
||||
#include <cassert>
|
||||
@@ -409,7 +408,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
_NODISCARD Statement_s* ConvertExpression(const ISimpleExpression* expression, const CommonMenuDef* menu, const CommonItemDef* item = nullptr) const
|
||||
[[nodiscard]] Statement_s* ConvertExpression(const ISimpleExpression* expression, const CommonMenuDef* menu, const CommonItemDef* item = nullptr) const
|
||||
{
|
||||
if (!expression)
|
||||
return nullptr;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertBounceSounds(const cspField_t& field, const std::string& value) const
|
||||
[[nodiscard]] bool ConvertBounceSounds(const cspField_t& field, const std::string& value) const
|
||||
{
|
||||
auto** bounceSound = reinterpret_cast<SndAliasCustom**>(reinterpret_cast<uintptr_t>(m_structure) + field.iOffset);
|
||||
if (value.empty())
|
||||
@@ -81,7 +81,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertNotetrackMap(const cspField_t& field, const std::string& value, const char* mapName, const size_t keyAndValueCount)
|
||||
[[nodiscard]] bool ConvertNotetrackMap(const cspField_t& field, const std::string& value, const char* mapName, const size_t keyAndValueCount)
|
||||
{
|
||||
std::vector<std::array<std::string, 2>> pairs;
|
||||
if (!ParseAsArray(value, pairs))
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionBinaryOperation.h"
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionConditionalOperator.h"
|
||||
#include "Parsing/Simple/Expression/SimpleExpressionUnaryOperation.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/StringUtils.h"
|
||||
|
||||
#include <cassert>
|
||||
@@ -26,7 +25,7 @@ namespace
|
||||
{
|
||||
class MenuConverter final : public AbstractMenuConverter, public IMenuConverter
|
||||
{
|
||||
_NODISCARD static rectDef_s ConvertRectDef(const CommonRect& rect)
|
||||
[[nodiscard]] static rectDef_s ConvertRectDef(const CommonRect& rect)
|
||||
{
|
||||
return rectDef_s{
|
||||
static_cast<float>(rect.x),
|
||||
@@ -38,7 +37,7 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
_NODISCARD static rectDef_s ConvertRectDefRelativeTo(const CommonRect& rect, const CommonRect& rectRelativeTo)
|
||||
[[nodiscard]] static rectDef_s ConvertRectDefRelativeTo(const CommonRect& rect, const CommonRect& rectRelativeTo)
|
||||
{
|
||||
return rectDef_s{
|
||||
static_cast<float>(rectRelativeTo.x + rect.x),
|
||||
@@ -409,7 +408,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
_NODISCARD Statement_s* ConvertExpression(const ISimpleExpression* expression, const CommonMenuDef* menu, const CommonItemDef* item = nullptr) const
|
||||
[[nodiscard]] Statement_s* ConvertExpression(const ISimpleExpression* expression, const CommonMenuDef* menu, const CommonItemDef* item = nullptr) const
|
||||
{
|
||||
if (!expression)
|
||||
return nullptr;
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertBounceSounds(const cspField_t& field, const std::string& value) const
|
||||
[[nodiscard]] bool ConvertBounceSounds(const cspField_t& field, const std::string& value) const
|
||||
{
|
||||
auto*** bounceSound = reinterpret_cast<const char***>(reinterpret_cast<uintptr_t>(m_structure) + field.iOffset);
|
||||
if (value.empty())
|
||||
@@ -179,7 +179,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertNotetrackSoundMap(const cspField_t& field, const std::string& value)
|
||||
[[nodiscard]] bool ConvertNotetrackSoundMap(const cspField_t& field, const std::string& value)
|
||||
{
|
||||
std::vector<std::array<std::string, 2>> pairs;
|
||||
if (!ParseAsArray(value, pairs))
|
||||
@@ -228,7 +228,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertWeaponCamo(const cspField_t& field, const std::string& value)
|
||||
[[nodiscard]] bool ConvertWeaponCamo(const cspField_t& field, const std::string& value)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
@@ -250,7 +250,7 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertAttachments(const cspField_t& field, const std::string& value)
|
||||
[[nodiscard]] bool ConvertAttachments(const cspField_t& field, const std::string& value)
|
||||
{
|
||||
std::vector<std::string> valueArray;
|
||||
if (!ParseAsArray(value, valueArray))
|
||||
@@ -295,13 +295,13 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
_NODISCARD static bool HasMoreThanOneAttachmentSetInMask(const int mask)
|
||||
[[nodiscard]] static bool HasMoreThanOneAttachmentSetInMask(const int mask)
|
||||
{
|
||||
// Check if int has more than 1 bit set
|
||||
return (mask & (mask - 1)) != 0;
|
||||
}
|
||||
|
||||
_NODISCARD bool ConvertAttachmentUniques(const cspField_t& field, const std::string& value)
|
||||
[[nodiscard]] bool ConvertAttachmentUniques(const cspField_t& field, const std::string& value)
|
||||
{
|
||||
std::vector<std::string> valueArray;
|
||||
if (!ParseAsArray(value, valueArray))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Obj/Gdt/GdtEntry.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
#include <exception>
|
||||
|
||||
@@ -9,7 +8,7 @@ class GdtReadingException : public std::exception
|
||||
{
|
||||
public:
|
||||
explicit GdtReadingException(std::string message);
|
||||
_NODISCARD const char* what() const noexcept override;
|
||||
[[nodiscard]] const char* what() const noexcept override;
|
||||
|
||||
private:
|
||||
std::string m_message;
|
||||
@@ -41,13 +40,13 @@ class AbstractGdtEntryReader
|
||||
protected:
|
||||
explicit AbstractGdtEntryReader(const GdtEntry& entry);
|
||||
|
||||
_NODISCARD std::string ReadStringProperty(const std::string& propertyName, std::string defaultValue = std::string()) const;
|
||||
_NODISCARD bool ReadBoolProperty(const std::string& propertyName, bool defaultValue = false) const;
|
||||
_NODISCARD int ReadIntegerProperty(const std::string& propertyName, int defaultValue = 0) const;
|
||||
_NODISCARD float ReadFloatProperty(const std::string& propertyName, float defaultValue = 0.0f) const;
|
||||
_NODISCARD GdtVec2 ReadVec2Property(const std::string& propertyName, GdtVec2 defaultValue = {}) const;
|
||||
_NODISCARD GdtVec3 ReadVec3Property(const std::string& propertyName, GdtVec3 defaultValue = {}) const;
|
||||
_NODISCARD GdtVec4 ReadVec4Property(const std::string& propertyName, GdtVec4 defaultValue = {}) const;
|
||||
[[nodiscard]] std::string ReadStringProperty(const std::string& propertyName, std::string defaultValue = std::string()) const;
|
||||
[[nodiscard]] bool ReadBoolProperty(const std::string& propertyName, bool defaultValue = false) const;
|
||||
[[nodiscard]] int ReadIntegerProperty(const std::string& propertyName, int defaultValue = 0) const;
|
||||
[[nodiscard]] float ReadFloatProperty(const std::string& propertyName, float defaultValue = 0.0f) const;
|
||||
[[nodiscard]] GdtVec2 ReadVec2Property(const std::string& propertyName, GdtVec2 defaultValue = {}) const;
|
||||
[[nodiscard]] GdtVec3 ReadVec3Property(const std::string& propertyName, GdtVec3 defaultValue = {}) const;
|
||||
[[nodiscard]] GdtVec4 ReadVec4Property(const std::string& propertyName, GdtVec4 defaultValue = {}) const;
|
||||
|
||||
const GdtEntry& m_entry;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "Asset/AssetRegistration.h"
|
||||
#include "InfoString/InfoString.h"
|
||||
#include "Pool/XAssetInfo.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/Logging/Log.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
#include "Zone/ZoneScriptStrings.h"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "Asset/AssetCreationContext.h"
|
||||
#include "MenuConversionException.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
namespace menu
|
||||
@@ -13,7 +12,7 @@ namespace menu
|
||||
protected:
|
||||
AbstractMenuConverter(bool disableOptimizations, ISearchPath& searchPath, MemoryManager& memory, AssetCreationContext& context);
|
||||
|
||||
_NODISCARD const char* ConvertString(const std::string& str) const;
|
||||
[[nodiscard]] const char* ConvertString(const std::string& str) const;
|
||||
static void PrintConversionExceptionDetails(const MenuConversionException& e);
|
||||
|
||||
bool m_disable_optimizations;
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
IPakEntryReadStream(std::istream& stream, IPakStreamManagerActions* streamManagerActions, uint8_t* chunkBuffer, int64_t startOffset, size_t entrySize);
|
||||
~IPakEntryReadStream() override;
|
||||
|
||||
_NODISCARD bool is_open() const override;
|
||||
[[nodiscard]] bool is_open() const override;
|
||||
bool close() override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/ObjStream.h"
|
||||
|
||||
#include <cstdint>
|
||||
@@ -30,5 +29,5 @@ public:
|
||||
IPakStreamManager& operator=(const IPakStreamManager& other) = delete;
|
||||
IPakStreamManager& operator=(IPakStreamManager&& other) noexcept = delete;
|
||||
|
||||
_NODISCARD std::unique_ptr<iobjstream> OpenStream(int64_t startPosition, size_t length) const;
|
||||
[[nodiscard]] std::unique_ptr<iobjstream> OpenStream(int64_t startPosition, size_t length) const;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "ObjContainer/ObjContainerRepository.h"
|
||||
#include "ObjContainer/SoundBank/SoundBankTypes.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "Utils/FileUtils.h"
|
||||
#include "Utils/ObjStream.h"
|
||||
#include "Zone/Zone.h"
|
||||
@@ -20,7 +19,7 @@ public:
|
||||
SoundBankEntryInputStream();
|
||||
SoundBankEntryInputStream(std::unique_ptr<std::istream> stream, SoundAssetBankEntry entry);
|
||||
|
||||
_NODISCARD bool IsOpen() const;
|
||||
[[nodiscard]] bool IsOpen() const;
|
||||
};
|
||||
|
||||
class SoundBank final : public ObjContainerReferenceable
|
||||
@@ -58,8 +57,8 @@ public:
|
||||
std::string GetName() override;
|
||||
|
||||
bool Initialize();
|
||||
_NODISCARD const std::vector<std::string>& GetDependencies() const;
|
||||
[[nodiscard]] const std::vector<std::string>& GetDependencies() const;
|
||||
|
||||
_NODISCARD bool VerifyChecksum(const SoundAssetBankChecksum& checksum) const;
|
||||
_NODISCARD SoundBankEntryInputStream GetEntryStream(unsigned int id) const;
|
||||
[[nodiscard]] bool VerifyChecksum(const SoundAssetBankChecksum& checksum) const;
|
||||
[[nodiscard]] SoundBankEntryInputStream GetEntryStream(unsigned int id) const;
|
||||
};
|
||||
|
||||
@@ -170,12 +170,12 @@ namespace graph2d
|
||||
}
|
||||
|
||||
public:
|
||||
_NODISCARD GenericGraph2D& GetResult() const
|
||||
[[nodiscard]] GenericGraph2D& GetResult() const
|
||||
{
|
||||
return m_state->m_result;
|
||||
}
|
||||
|
||||
_NODISCARD bool HasExpectedKnotCount() const
|
||||
[[nodiscard]] bool HasExpectedKnotCount() const
|
||||
{
|
||||
return GetExpectedKnotCount() == GetActualKnotCount();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace
|
||||
IwdFile& operator=(const IwdFile& other) = default;
|
||||
IwdFile& operator=(IwdFile&& other) noexcept = default;
|
||||
|
||||
_NODISCARD bool is_open() const override
|
||||
[[nodiscard]] bool is_open() const override
|
||||
{
|
||||
return m_open;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "Parsing/Simple/SimpleParserValue.h"
|
||||
#include "StructuredDataDef/CommonStructuredDataDef.h"
|
||||
#include "StructuredDataDefParserState.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
namespace sdd
|
||||
{
|
||||
@@ -24,6 +23,6 @@ namespace sdd
|
||||
|
||||
public:
|
||||
explicit StructuredDataDefParser(SimpleLexer* lexer);
|
||||
_NODISCARD std::vector<std::unique_ptr<CommonStructuredDataDef>> GetDefs() const;
|
||||
[[nodiscard]] std::vector<std::unique_ptr<CommonStructuredDataDef>> GetDefs() const;
|
||||
};
|
||||
} // namespace sdd
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "StructuredDataDefSizeCalculator.h"
|
||||
|
||||
#include "Utils/Alignment.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
@@ -32,7 +31,7 @@ class StructuredDataDefSizeCalculatorInternal
|
||||
std::vector<bool> m_indexed_array_calculated;
|
||||
std::vector<bool> m_enumed_array_calculated;
|
||||
|
||||
_NORETURN void ThrowCircularDependencyException(const size_t structIndex) const
|
||||
[[noreturn]] void ThrowCircularDependencyException(const size_t structIndex) const
|
||||
{
|
||||
assert(structIndex < m_def.m_structs.size());
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "StructuredDataDef/CommonStructuredDataDef.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
@@ -15,8 +14,8 @@ namespace sdd
|
||||
public:
|
||||
explicit SizeCalculationException(std::string message);
|
||||
|
||||
_NODISCARD const std::string& Message() const;
|
||||
_NODISCARD char const* what() const noexcept override;
|
||||
[[nodiscard]] const std::string& Message() const;
|
||||
[[nodiscard]] char const* what() const noexcept override;
|
||||
};
|
||||
|
||||
class StructuredDataDefSizeCalculator
|
||||
|
||||
Reference in New Issue
Block a user