From b3a9defe8c3120ca4d62b40b9ffbf8fb30525e08 Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Sun, 15 Sep 2024 23:09:11 +0200 Subject: [PATCH 1/2] chore: Bump cpp-sdk --- deps/cpp-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/cpp-sdk b/deps/cpp-sdk index b1ced94..b782525 160000 --- a/deps/cpp-sdk +++ b/deps/cpp-sdk @@ -1 +1 @@ -Subproject commit b1ced94027a7b3c0c2167b12e45da80b49c8527b +Subproject commit b7825258fafcb6d9aa3906b41e27cfe2d8bf93af From 84f03a5713604cedc58a65d20c26d194a5f9b8bb Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Sun, 15 Sep 2024 23:10:03 +0200 Subject: [PATCH 2/2] fix: Fix Build --- module/deps/Log.h | 12 +++++++----- module/src/logger.h | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/module/deps/Log.h b/module/deps/Log.h index 44b8452..5560b3a 100644 --- a/module/deps/Log.h +++ b/module/deps/Log.h @@ -5,6 +5,8 @@ class Log { + static constexpr const char* prefix = "[V8 Bytecode]"; + std::stringstream buf; typedef Log& (*LogFn)(Log&); @@ -103,11 +105,11 @@ class Log { switch(log.type) { - case INFO: alt::ICore::Instance().LogInfo(log.buf.str()); break; - case DEBUG: alt::ICore::Instance().LogDebug(log.buf.str().c_str()); break; - case WARNING: alt::ICore::Instance().LogWarning(log.buf.str().c_str()); break; - case ERROR: alt::ICore::Instance().LogError(log.buf.str().c_str()); break; - case COLORED: alt::ICore::Instance().LogColored(log.buf.str().c_str()); break; + case INFO: alt::ICore::Instance().LogInfo(prefix, log.buf.str()); break; + case DEBUG: alt::ICore::Instance().LogDebug(prefix, log.buf.str().c_str()); break; + case WARNING: alt::ICore::Instance().LogWarning(prefix, log.buf.str().c_str()); break; + case ERROR: alt::ICore::Instance().LogError(prefix, log.buf.str().c_str()); break; + case COLORED: alt::ICore::Instance().LogColored(prefix, log.buf.str().c_str()); break; } log.buf.str(""); diff --git a/module/src/logger.h b/module/src/logger.h index 3b433b7..cc9411d 100644 --- a/module/src/logger.h +++ b/module/src/logger.h @@ -5,7 +5,7 @@ class Logger : public BytecodeCompiler::ILogger { - static constexpr const char* prefix = "[V8 Bytecode] "; + static constexpr const char* prefix = "[V8 Bytecode]"; public: std::string GetHighlightColor() override @@ -15,10 +15,10 @@ class Logger : public BytecodeCompiler::ILogger void Log(const std::string& message) override { - alt::ICore::Instance().LogColored(GetHighlightColor() + prefix + "~w~" + message); + alt::ICore::Instance().LogColored(prefix, message); } void LogError(const std::string& message) override { - alt::ICore::Instance().LogError(std::string(prefix) + " " + message); + alt::ICore::Instance().LogError(std::string(prefix), message); } };