Skip to content

Commit 1b875f3

Browse files
committed
Simplify
1 parent c0abad5 commit 1b875f3

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

include/utils/global_defines.h

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,4 @@
88
#define QSTRING_CSTR(str) str.toUtf8().constData()
99
typedef QList< int > QIntList;
1010

11-
// Undefine the max macro if it's defined (Windows-specific)
12-
#ifdef max
13-
#undef max
14-
#endif
15-
16-
// Define your constexpr variable
17-
constexpr uint32_t UINT8_MAX_SQUARED = static_cast<uint32_t>(std::numeric_limits<unsigned char>::max()) * static_cast<uint32_t>(std::numeric_limits<unsigned char>::max());
18-
19-
// Restore the max macro only if it was previously defined (Windows-specific)
20-
#ifdef _MSC_VER
21-
#define NOMINMAX // Prevent Windows.h from defining min and max macros
22-
#endif
23-
24-
// Restore the max macro if needed (Windows-specific)
25-
#ifdef _MSC_VER
26-
#ifndef max
27-
#define max(a,b) (((a) > (b)) ? (a) : (b))
28-
#endif
29-
#endif
30-
31-
11+
constexpr uint32_t UINT8_MAX_SQUARED = static_cast<uint32_t>(UINT8_MAX) * UINT8_MAX;

0 commit comments

Comments
 (0)