Commit 2fa347ba authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Work around MSVC 13 lack of constexpr

parent f9418f42
......@@ -63,9 +63,15 @@ public:
AsNode,
};
// To be able to write Media::FromLocation
#if _MSC_VER >= 1900
constexpr static FromType FromPath = FromType::FromPath;
constexpr static FromType FromLocation = FromType::FromLocation;
constexpr static FromType AsNode = FromType::AsNode;
#else
static const FromType FromPath = FromType::FromPath;
static const FromType FromLocation = FromType::FromLocation;
static const FromType AsNode = FromType::AsNode;
#endif
/**
* @brief Media Constructs a libvlc Media instance
......
......@@ -87,10 +87,17 @@ public:
Video,
Subtitle
};
#if _MSC_VER >= 1900
constexpr static Type Unknown = Type::Unknown;
constexpr static Type Audio = Type::Audio;
constexpr static Type Video = Type::Video;
constexpr static Type Subtitle = Type::Subtitle;
#else
const static Type Unknown = Type::Unknown;
const static Type Audio = Type::Audio;
const static Type Video = Type::Video;
const static Type Subtitle = Type::Subtitle;
#endif
uint32_t codec() const
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment