avoid numeric_limits use on Q_OS_WINDOWS

This commit is contained in:
Stephen Birarda 2016-09-01 11:18:40 -07:00
parent 8977f9ed92
commit 545181a465

View file

@ -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;