Refactored how logging works

Made it central reusable logic. No longer needs to be passed around, opened or closed.
This commit is contained in:
Pasha Bibko
2025-05-05 23:55:22 +01:00
parent 0f11fe006b
commit 5339df9b36
22 changed files with 231 additions and 193 deletions

View File

@@ -11,7 +11,8 @@
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#undef NOMINMAX
#undef WIN32_LEAN_AND_MEAN
// Else alerts the user that their system is not supported //
#else
#error "This code is only designed to work on windows"
@@ -22,6 +23,17 @@
#error "This code is only designed to work with Visual Studio"
#endif // _MSC_VER
// My commonly used macros //
#define RETURN_IF(condition) if (condition) { return; }
#define RETURN_V_IF(value, condition) if (condition) { return value; }
#ifdef COMMON_EXPORTS
#define COMMON_API __declspec(dllexport)
#else
#define COMMON_API __declspec(dllimport)
#endif // COMMON_EXPORTS
// Includes commonly used STD files //
#include <unordered_map>