From e33c01612a5d05e5f8d28d03fe36125a62c0fdc5 Mon Sep 17 00:00:00 2001 From: Harry <4920526+harryr0se@users.noreply.github.com> Date: Sun, 18 May 2025 14:21:05 +0100 Subject: [PATCH 1/2] These appear to be specific to MSVC rather than Windows --- inkcpp_compiler/binary_emitter.cpp | 4 ++-- inkcpp_compiler/reporter.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inkcpp_compiler/binary_emitter.cpp b/inkcpp_compiler/binary_emitter.cpp index 61cc9ddf..4f281843 100644 --- a/inkcpp_compiler/binary_emitter.cpp +++ b/inkcpp_compiler/binary_emitter.cpp @@ -14,7 +14,7 @@ #include #include -#ifndef WIN32 +#ifndef _MSC_VER # include #endif @@ -26,7 +26,7 @@ using std::string; char* strtok_s(char* s, const char* sep, char** context) { -#if defined(_WIN32) || defined(_WIN64) +#ifdef _MSC_VER return ::strtok_s(s, sep, context); #else if (context == nullptr || sep == nullptr || (s == nullptr && *context == nullptr)) { diff --git a/inkcpp_compiler/reporter.cpp b/inkcpp_compiler/reporter.cpp index ab6e01ba..a8d96a84 100644 --- a/inkcpp_compiler/reporter.cpp +++ b/inkcpp_compiler/reporter.cpp @@ -68,7 +68,7 @@ namespace ink::compiler::internal _list = list; // Make sure our buffer is empty -#ifdef WIN32 +#ifdef _MSC_VER _Tidy(); #endif } @@ -90,7 +90,7 @@ namespace ink::compiler::internal // Clear our state _list = nullptr; -#ifdef WIN32 +#ifdef _MSC_VER _Tidy(); #endif From c48db05932f577dd4d8a3d530560f16637a837f8 Mon Sep 17 00:00:00 2001 From: Julian Benda Date: Sun, 9 Nov 2025 12:58:34 +0100 Subject: [PATCH 2/2] style: autoformat --- inkcpp_compiler/reporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inkcpp_compiler/reporter.cpp b/inkcpp_compiler/reporter.cpp index a8d96a84..b3786e43 100644 --- a/inkcpp_compiler/reporter.cpp +++ b/inkcpp_compiler/reporter.cpp @@ -69,7 +69,7 @@ namespace ink::compiler::internal // Make sure our buffer is empty #ifdef _MSC_VER - _Tidy(); + _Tidy(); #endif } @@ -91,7 +91,7 @@ namespace ink::compiler::internal // Clear our state _list = nullptr; #ifdef _MSC_VER - _Tidy(); + _Tidy(); #endif // Should we throw?