Skip to content

Commit b2946ee

Browse files
committed
Small fixes and minor changes:
- Added vscode files to gitignore - Updated logger_internal.cpp (WIN32 -> BOREALIS_WIN) - Updated preprocessor directives in types.h - Removed preprocessor directives around DefaultInitString test
1 parent 76897b0 commit b2946ee

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ CMakeUserPresets.json
2121

2222
.vs/
2323
/CMakeSettings.json
24+
25+
26+
# VSCode files
27+
.vscode/

src/core/debug/logger_internal.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#include "logger_internal.h"
22
#include "logger.h"
33

4-
#ifdef WIN32
4+
#ifdef BOREALIS_WIN
55
#include <Windows.h>
66
#endif
77

88
namespace Borealis::Debug
99
{
1010
Borealis::Types::int16 LogMessageInternal(const DebugInfoDesc desc)
1111
{
12-
#ifdef WIN32
12+
#ifdef BOREALIS_WIN
1313

1414
static HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
1515
switch (desc.logType)
@@ -40,7 +40,7 @@ namespace Borealis::Debug
4040
const Borealis::Types::int16 result = printf("%s", desc.msg.c_str());
4141
printf("\n%s, %u\n", desc.fileName.c_str(), desc.line);
4242

43-
#ifdef WIN32
43+
#ifdef BOREALIS_WIN
4444
SetConsoleTextAttribute(hConsole, 15);
4545
#endif
4646

src/core/types/types.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Borealis::Types
66
{
77

8-
#ifdef BOREALIS_WIN
8+
#if defined(BOREALIS_WIN)
99

1010
typedef int_fast8_t int8;
1111
typedef short int16;
@@ -19,9 +19,8 @@ namespace Borealis::Types
1919
typedef intptr_t int64Ptr;
2020
typedef uintptr_t uint64Ptr;
2121

22-
#elif BOREALIS_LINUX
22+
#elif defined(BOREALIS_LINUX)
2323

24-
// @TODO: Adapt for Linux
2524
typedef int_fast8_t int8;
2625
typedef short int16;
2726
typedef int int32;
@@ -35,7 +34,7 @@ namespace Borealis::Types
3534
typedef intptr_t int64Ptr;
3635
typedef uintptr_t uint64Ptr;
3736

38-
#elif BOREALIS_OSX
37+
#elif defined(BOREALIS_OSX)
3938

4039
// @TODO: Adapt for OSX
4140
typedef int_fast8_t int8;
@@ -51,5 +50,9 @@ namespace Borealis::Types
5150
typedef intptr_t int64Ptr;
5251
typedef uintptr_t uint64Ptr;
5352

53+
#else
54+
55+
#error No valid build platform detected!
56+
5457
#endif
5558
}

tests/test_string.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
using namespace Borealis::Types;
55

6-
#ifdef BOREALIS_DEBUG // Is being optimized away in RelWithDebInfo
7-
86
TEST(StringTest, DefaultInitString)
97
{
108
StringId myString{};
@@ -13,8 +11,6 @@ TEST(StringTest, DefaultInitString)
1311
EXPECT_EQ(myString, myString2);
1412
}
1513

16-
#endif
17-
1814
TEST(StringTest, StringEquality)
1915
{
2016
StringId myString = String("MyFirstTestString");

0 commit comments

Comments
 (0)