fix: resolve build errors caused by Windows macro conflict and TransformComponent access issues

This commit is contained in:
illyum 2024-09-09 02:59:58 -06:00
parent edea0b2f9b
commit 72496226d8
3 changed files with 17 additions and 16 deletions

View File

@ -37,23 +37,23 @@ void Logger::Log(LogLevel level, const std::string& message, const std::string&
} }
void Logger::LogInfo(const std::string& message, const std::string& scope) { void Logger::LogInfo(const std::string& message, const std::string& scope) {
Log(LogLevel::INFO, message, scope); Log(LogLevel::INFOL, message, scope);
} }
void Logger::LogDebug(const std::string& message, const std::string& scope) { void Logger::LogDebug(const std::string& message, const std::string& scope) {
Log(LogLevel::DEBUG, message, scope); Log(LogLevel::DEBUGL, message, scope);
} }
void Logger::LogWarning(const std::string& message, const std::string& scope) { void Logger::LogWarning(const std::string& message, const std::string& scope) {
Log(LogLevel::WARNING, message, scope); Log(LogLevel::WARNINGL, message, scope);
} }
void Logger::LogError(const std::string& message, const std::string& scope) { void Logger::LogError(const std::string& message, const std::string& scope) {
Log(LogLevel::ERROR, message, scope); Log(LogLevel::ERRORL, message, scope);
} }
void Logger::LogCritical(const std::string& message, const std::string& scope) { void Logger::LogCritical(const std::string& message, const std::string& scope) {
Log(LogLevel::CRITICAL, message, scope); Log(LogLevel::CRITICALL, message, scope);
} }
void Logger::DumpLogs(const std::string& dumpFileName) { void Logger::DumpLogs(const std::string& dumpFileName) {
@ -91,11 +91,11 @@ std::string Logger::GetTimestamp() {
std::string Logger::LogLevelToString(LogLevel level) { std::string Logger::LogLevelToString(LogLevel level) {
switch (level) { switch (level) {
case LogLevel::DEBUG: return "DEBUG"; case LogLevel::DEBUGL: return "DEBUG";
case LogLevel::INFO: return "INFO"; case LogLevel::INFOL: return "INFO";
case LogLevel::WARNING: return "WARNING"; case LogLevel::WARNINGL: return "WARNING";
case LogLevel::ERROR: return "ERROR"; case LogLevel::ERRORL: return "ERROR";
case LogLevel::CRITICAL: return "CRITICAL"; case LogLevel::CRITICALL: return "CRITICAL";
default: return "UNKNOWN"; default: return "UNKNOWN";
} }
} }

View File

@ -8,11 +8,11 @@
#include <mutex> #include <mutex>
enum class LogLevel { enum class LogLevel {
DEBUG = 0, DEBUGL = 0,
INFO = 10, INFOL = 10,
WARNING = 20, WARNINGL = 20,
ERROR = 30, ERRORL = 30,
CRITICAL = 40 CRITICALL = 40
}; };
class Logger { class Logger {
@ -25,7 +25,7 @@ public:
Logger(const Logger&) = delete; Logger(const Logger&) = delete;
Logger& operator=(const Logger&) = delete; Logger& operator=(const Logger&) = delete;
void Initialize(const std::string &logFile = "", LogLevel consoleLevel = LogLevel::DEBUG, LogLevel fileLevel = LogLevel::DEBUG); void Initialize(const std::string &logFile = "", LogLevel consoleLevel = LogLevel::DEBUGL, LogLevel fileLevel = LogLevel::DEBUGL);
void Log(LogLevel level, const std::string &message, const std::string &scope = ""); void Log(LogLevel level, const std::string &message, const std::string &scope = "");
void LogDebug(const std::string& message, const std::string& scope = ""); void LogDebug(const std::string& message, const std::string& scope = "");
void LogInfo(const std::string& message, const std::string& scope = ""); void LogInfo(const std::string& message, const std::string& scope = "");

View File

@ -2,6 +2,7 @@
class TransformComponent { class TransformComponent {
public:
float x = 0.0f; float x = 0.0f;
float y = 0.0f; float y = 0.0f;
float scaleX = 1.0f; float scaleX = 1.0f;