mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-08 09:47:26 +00:00
Reformat code with clang format
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonFunctionDef
|
||||
@@ -12,4 +12,4 @@ namespace menu
|
||||
std::string m_name;
|
||||
std::unique_ptr<ISimpleExpression> m_value;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "CommonMenuTypes.h"
|
||||
#include "EventHandler/CommonEventHandlerSet.h"
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
enum class CommonItemFeatureType
|
||||
@@ -163,4 +163,4 @@ namespace menu
|
||||
std::string m_enum_dvar_name;
|
||||
std::unique_ptr<CommonItemFeaturesNewsTicker> m_news_ticker_features;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -1,15 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include "CommonItemDef.h"
|
||||
#include "CommonMenuTypes.h"
|
||||
#include "EventHandler/CommonEventHandlerSet.h"
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonMenuDef
|
||||
@@ -63,4 +63,4 @@ namespace menu
|
||||
|
||||
std::vector<std::unique_ptr<CommonItemDef>> m_items;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "CommonMenuTypes.h"
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
using namespace menu;
|
||||
|
||||
@@ -25,10 +25,8 @@ CommonColor::CommonColor(const double r, const double g, const double b, const d
|
||||
|
||||
bool CommonColor::Equals(const CommonColor& other) const
|
||||
{
|
||||
return std::fabs(this->r - other.r) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->g - other.g) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->b - other.b) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->a - other.a) < std::numeric_limits<double>::epsilon();
|
||||
return std::fabs(this->r - other.r) < std::numeric_limits<double>::epsilon() && std::fabs(this->g - other.g) < std::numeric_limits<double>::epsilon()
|
||||
&& std::fabs(this->b - other.b) < std::numeric_limits<double>::epsilon() && std::fabs(this->a - other.a) < std::numeric_limits<double>::epsilon();
|
||||
}
|
||||
|
||||
CommonRect::CommonRect()
|
||||
|
@@ -11,6 +11,7 @@ namespace menu
|
||||
double b;
|
||||
double a;
|
||||
};
|
||||
|
||||
double array[4];
|
||||
|
||||
CommonColor();
|
||||
@@ -32,4 +33,4 @@ namespace menu
|
||||
CommonRect(double x, double y, double w, double h);
|
||||
CommonRect(double x, double y, double w, double h, int horizontalAlign, int verticalAlign);
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -2,10 +2,10 @@
|
||||
|
||||
using namespace menu;
|
||||
|
||||
CommonEventHandlerCondition::CommonEventHandlerCondition()
|
||||
= default;
|
||||
CommonEventHandlerCondition::CommonEventHandlerCondition() = default;
|
||||
|
||||
CommonEventHandlerCondition::CommonEventHandlerCondition(std::unique_ptr<ISimpleExpression> condition, std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
CommonEventHandlerCondition::CommonEventHandlerCondition(std::unique_ptr<ISimpleExpression> condition,
|
||||
std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
std::unique_ptr<CommonEventHandlerSet> elseElements)
|
||||
: m_condition(std::move(condition)),
|
||||
m_condition_elements(std::move(conditionElements)),
|
||||
|
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "CommonEventHandlerSet.h"
|
||||
#include "ICommonEventHandlerElement.h"
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonEventHandlerCondition final : public ICommonEventHandlerElement
|
||||
@@ -16,9 +16,10 @@ namespace menu
|
||||
std::unique_ptr<CommonEventHandlerSet> m_else_elements;
|
||||
|
||||
CommonEventHandlerCondition();
|
||||
CommonEventHandlerCondition(std::unique_ptr<ISimpleExpression> condition, std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
CommonEventHandlerCondition(std::unique_ptr<ISimpleExpression> condition,
|
||||
std::unique_ptr<CommonEventHandlerSet> conditionElements,
|
||||
std::unique_ptr<CommonEventHandlerSet> elseElements);
|
||||
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -2,8 +2,7 @@
|
||||
|
||||
using namespace menu;
|
||||
|
||||
CommonEventHandlerScript::CommonEventHandlerScript()
|
||||
= default;
|
||||
CommonEventHandlerScript::CommonEventHandlerScript() = default;
|
||||
|
||||
CommonEventHandlerScript::CommonEventHandlerScript(std::string script)
|
||||
: m_script(std::move(script))
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ICommonEventHandlerElement.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonEventHandlerScript final : public ICommonEventHandlerElement
|
||||
@@ -16,4 +16,4 @@ namespace menu
|
||||
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -2,8 +2,7 @@
|
||||
|
||||
using namespace menu;
|
||||
|
||||
CommonEventHandlerSet::CommonEventHandlerSet()
|
||||
= default;
|
||||
CommonEventHandlerSet::CommonEventHandlerSet() = default;
|
||||
|
||||
CommonEventHandlerSet::CommonEventHandlerSet(std::vector<std::unique_ptr<ICommonEventHandlerElement>> elements)
|
||||
: m_elements(std::move(elements))
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "ICommonEventHandlerElement.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "ICommonEventHandlerElement.h"
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonEventHandlerSet
|
||||
@@ -15,4 +15,4 @@ namespace menu
|
||||
CommonEventHandlerSet();
|
||||
explicit CommonEventHandlerSet(std::vector<std::unique_ptr<ICommonEventHandlerElement>> elements);
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "ICommonEventHandlerElement.h"
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
enum class SetLocalVarType
|
||||
@@ -28,4 +28,4 @@ namespace menu
|
||||
|
||||
_NODISCARD CommonEventHandlerElementType GetType() const override;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -25,4 +25,4 @@ namespace menu
|
||||
|
||||
_NODISCARD virtual CommonEventHandlerElementType GetType() const = 0;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -12,9 +12,7 @@ bool CommonExpressionBaseFunctionCall::Equals(const ISimpleExpression* other) co
|
||||
{
|
||||
const auto otherFunctionCall = dynamic_cast<const CommonExpressionBaseFunctionCall*>(other);
|
||||
|
||||
if (!otherFunctionCall
|
||||
|| m_function_name != otherFunctionCall->m_function_name
|
||||
|| m_function_index != otherFunctionCall->m_function_index
|
||||
if (!otherFunctionCall || m_function_name != otherFunctionCall->m_function_name || m_function_index != otherFunctionCall->m_function_index
|
||||
|| m_args.size() != otherFunctionCall->m_args.size())
|
||||
{
|
||||
return false;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
#include "Parsing/Simple/Expression/ISimpleExpression.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class CommonExpressionBaseFunctionCall final : public ISimpleExpression
|
||||
@@ -19,4 +19,4 @@ namespace menu
|
||||
_NODISCARD SimpleExpressionValue EvaluateStatic() const override;
|
||||
_NODISCARD SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -16,4 +16,4 @@ namespace menu
|
||||
_NODISCARD SimpleExpressionValue EvaluateStatic() const override;
|
||||
_NODISCARD SimpleExpressionValue EvaluateNonStatic(const ISimpleExpressionScopeValues* scopeValues) const override;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -7,4 +7,4 @@ namespace menu
|
||||
IW4,
|
||||
IW5
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "CommonFunctionDef.h"
|
||||
#include "CommonMenuDef.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class ParsingResult
|
||||
@@ -15,4 +15,4 @@ namespace menu
|
||||
std::vector<std::unique_ptr<CommonFunctionDef>> m_functions;
|
||||
std::vector<std::string> m_menus_to_load;
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
Reference in New Issue
Block a user