mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 19:58:15 +02:00
avoid numeric_limits use on Q_OS_WINDOWS
This commit is contained in:
parent
8977f9ed92
commit
545181a465
1 changed files with 11 additions and 0 deletions
|
@ -13,7 +13,12 @@
|
|||
#include "Forward.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <limits>
|
||||
#endif
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
|
@ -22,7 +27,13 @@ namespace recording {
|
|||
struct FrameHeader {
|
||||
using Time = uint32_t;
|
||||
|
||||
// until we use a version of visual studio that has constexpr support, we can't use numeric_limits at compile time
|
||||
#ifdef Q_OS_WINDOWS
|
||||
static const Time INVALID_TIME = UINT32_MAX;
|
||||
#else
|
||||
static const Time INVALID_TIME = std::numeric_limits<uint32_t>::max();
|
||||
#endif
|
||||
|
||||
static const FrameType TYPE_INVALID = 0xFFFF;
|
||||
static const FrameType TYPE_HEADER = 0x0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue