-
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,31 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <limits> | ||
|
||
#include <QList> | ||
|
||
#define QSTRING_CSTR(str) str.toUtf8().constData() | ||
typedef QList< int > QIntList; | ||
|
||
// Undefine the max macro if it's defined (Windows-specific) | ||
#ifdef max | ||
#undef max | ||
#endif | ||
|
||
// Define your constexpr variable | ||
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()); | ||
|
||
// Restore the max macro only if it was previously defined (Windows-specific) | ||
#ifdef _MSC_VER | ||
#define NOMINMAX // Prevent Windows.h from defining min and max macros | ||
#endif | ||
|
||
// Restore the max macro if needed (Windows-specific) | ||
#ifdef _MSC_VER | ||
#ifndef max | ||
#define max(a,b) (((a) > (b)) ? (a) : (b)) | ||
#endif | ||
#endif | ||
|
||
|