diff --git a/source/utility/macros.h b/source/utility/macros.h index 6927d1ac..3d2bc320 100644 --- a/source/utility/macros.h +++ b/source/utility/macros.h @@ -4,10 +4,12 @@ #ifdef _WIN32 #include + #define DEBUG_BREAK() __debugbreak() #define SYSTEM_WINDOWS #elif __linux__ #include + #define DEBUG_BREAK() raise(SIGTRAP) #define SYSTEM_LINUX #else diff --git a/source/utility/shell.cpp b/source/utility/shell.cpp index dc29b08d..b98e0809 100644 --- a/source/utility/shell.cpp +++ b/source/utility/shell.cpp @@ -1,12 +1,11 @@ #include "shell.h" -#include "utility/macros.h" namespace utility { auto shell::execute(const std::string& command) -> i32 { #ifdef SYSTEM_WINDOWS const std::string windows_command = "cmd /c " + command; return system(windows_command.c_str()); -#elif SYSTEM_LINUX +#elif defined SYSTEM_LINUX return system(command.c_str()); #else PANIC("unsupported platform detected"); @@ -17,7 +16,7 @@ namespace utility { std::string command; #ifdef SYSTEM_WINDOWS command = "start " + link; -#elif SYSTEM_LINUX +#elif defined SYSTEM_LINUX command = "xdg-open " + link; #else PANIC("unsupported platform detected"); diff --git a/source/utility/shell.h b/source/utility/shell.h index c3539f0b..8a074464 100644 --- a/source/utility/shell.h +++ b/source/utility/shell.h @@ -1,5 +1,5 @@ #pragma once -#include "utility/types.h" +#include "utility/macros.h" namespace utility { /**