mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-21 04:07:52 -05:00
Reformat code with clang format
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
#include "AbstractMenuDumper.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <cmath>
|
||||
|
||||
#include "Parsing/Impl/ParserSingleInputStream.h"
|
||||
#include "Parsing/Simple/SimpleLexer.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
AbstractMenuDumper::AbstractMenuDumper(std::ostream& stream)
|
||||
: m_stream(stream),
|
||||
m_indent(0u)
|
||||
@ -115,18 +115,22 @@ bool AbstractMenuDumper::DoesTokenNeedQuotationMarks(const std::string& token)
|
||||
if (token.empty())
|
||||
return true;
|
||||
|
||||
const auto hasAlNumCharacter = std::any_of(token.begin(), token.end(), [](const char& c)
|
||||
{
|
||||
return isalnum(c);
|
||||
});
|
||||
const auto hasAlNumCharacter = std::any_of(token.begin(),
|
||||
token.end(),
|
||||
[](const char& c)
|
||||
{
|
||||
return isalnum(c);
|
||||
});
|
||||
|
||||
if (!hasAlNumCharacter)
|
||||
return false;
|
||||
|
||||
const auto hasNonIdentifierCharacter = std::any_of(token.begin(), token.end(), [](const char& c)
|
||||
{
|
||||
return !isalnum(c) && c != '_';
|
||||
});
|
||||
const auto hasNonIdentifierCharacter = std::any_of(token.begin(),
|
||||
token.end(),
|
||||
[](const char& c)
|
||||
{
|
||||
return !isalnum(c) && c != '_';
|
||||
});
|
||||
|
||||
return hasNonIdentifierCharacter;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstddef>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class AbstractMenuDumper
|
||||
@ -11,8 +11,8 @@ protected:
|
||||
static constexpr auto MENU_KEY_SPACING = 28u;
|
||||
static const inline std::string BOOL_VALUE_TRUE = "1";
|
||||
static const inline std::string BOOL_VALUE_FALSE = "0";
|
||||
static constexpr inline float COLOR_0000[4]{ 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
static constexpr inline float COLOR_1111[4]{ 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
static constexpr inline float COLOR_0000[4]{0.0f, 0.0f, 0.0f, 0.0f};
|
||||
static constexpr inline float COLOR_1111[4]{1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
||||
std::ostream& m_stream;
|
||||
size_t m_indent;
|
||||
@ -39,7 +39,7 @@ protected:
|
||||
void WriteBoolProperty(const std::string& propertyKey, bool propertyValue, bool defaultValue) const;
|
||||
void WriteIntProperty(const std::string& propertyKey, int propertyValue, int defaultValue) const;
|
||||
void WriteFloatProperty(const std::string& propertyKey, float propertyValue, float defaultValue) const;
|
||||
void WriteColorProperty(const std::string& propertyKey, const float(&propertyValue)[4], const float(&defaultValue)[4]) const;
|
||||
void WriteColorProperty(const std::string& propertyKey, const float (&propertyValue)[4], const float (&defaultValue)[4]) const;
|
||||
void WriteKeywordProperty(const std::string& propertyKey, bool shouldWrite) const;
|
||||
void WriteFlagsProperty(const std::string& propertyKey, int flagsValue) const;
|
||||
|
||||
@ -50,4 +50,4 @@ public:
|
||||
void End();
|
||||
|
||||
void IncludeMenu(const std::string& menuPath) const;
|
||||
};
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include <map>
|
||||
|
||||
#include "Dumping/IZoneAssetDumperState.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class MenuDumpingZoneState final : public IZoneAssetDumperState
|
||||
@ -21,4 +21,4 @@ namespace menu
|
||||
|
||||
void CreateMenuDumpingState(const void* menuDef, std::string path, const void* aliasMenuList);
|
||||
};
|
||||
}
|
||||
} // namespace menu
|
||||
|
Reference in New Issue
Block a user