From 3de172ff6c3a5375603ca65f2cd2183cfe37567f Mon Sep 17 00:00:00 2001 From: dev0 Date: Fri, 28 Nov 2025 18:41:19 +0530 Subject: [PATCH] Fixes --- Src/IACore/imp/cpp/Logger.cpp | 1 + Src/IACore/imp/cpp/ProcessOps.cpp | 8 ++++---- Src/IACore/inc/IACore/PCH.hpp | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Src/IACore/imp/cpp/Logger.cpp b/Src/IACore/imp/cpp/Logger.cpp index 8293518..8a2efe5 100644 --- a/Src/IACore/imp/cpp/Logger.cpp +++ b/Src/IACore/imp/cpp/Logger.cpp @@ -63,6 +63,7 @@ namespace IACore { s_logFile.write(outLine.data(), outLine.size()); s_logFile.put('\n'); + s_logFile.flush(); } } } // namespace IACore \ No newline at end of file diff --git a/Src/IACore/imp/cpp/ProcessOps.cpp b/Src/IACore/imp/cpp/ProcessOps.cpp index 633cfa1..18f9d17 100644 --- a/Src/IACore/imp/cpp/ProcessOps.cpp +++ b/Src/IACore/imp/cpp/ProcessOps.cpp @@ -52,15 +52,15 @@ namespace IACore SharedPtr handle = std::make_shared(); handle->IsRunning = true; - handle->ThreadHandle = JoiningThread([&, cmd = IA_MOVE(command), args = std::move(args)]() mutable { + handle->ThreadHandle = JoiningThread([=, h = handle.get(), cmd = IA_MOVE(command), args = std::move(args)]() mutable { #if IA_PLATFORM_WINDOWS - auto result = SpawnProcessWindows(cmd, args, onOutputLineCallback, handle->ID); + auto result = SpawnProcessWindows(cmd, args, onOutputLineCallback, h->ID); #else - auto result = SpawnProcessPosix(cmd, args, onOutputLineCallback, handle->ID); + auto result = SpawnProcessPosix(cmd, args, onOutputLineCallback, h->ID); #endif - handle->IsRunning = false; + h->IsRunning = false; if (!onFinishCallback) return; diff --git a/Src/IACore/inc/IACore/PCH.hpp b/Src/IACore/inc/IACore/PCH.hpp index b1ff7b1..a405e5c 100644 --- a/Src/IACore/inc/IACore/PCH.hpp +++ b/Src/IACore/inc/IACore/PCH.hpp @@ -70,6 +70,9 @@ # define __DEBUG_MODE__ # define __BUILD_MODE_NAME "debug" # define DEBUG_ONLY(v) v +# ifndef _DEBUG +# define _DEBUG +# endif #else # define __RELEASE_MODE__ # define __BUILD_MODE_NAME "release"