[vlc-commits] Fix MSVC build

Hugo Beauzée-Luyssen git at videolan.org
Fri May 15 17:44:42 CEST 2015


libvlcpp | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri May 15 17:44:17 2015 +0200| [df80ce3551175893334cd949f54b4e13837738ea] | committer: Hugo Beauzée-Luyssen

Fix MSVC build

> http://git.videolan.org/gitweb.cgi/libvlcpp.git/?a=commit;h=df80ce3551175893334cd949f54b4e13837738ea
---

 vlcpp/Media.hpp  |    4 ++++
 vlcpp/common.hpp |   14 +++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/vlcpp/Media.hpp b/vlcpp/Media.hpp
index 5482154..e10d44a 100644
--- a/vlcpp/Media.hpp
+++ b/vlcpp/Media.hpp
@@ -46,7 +46,11 @@ private:
         Seek,
         Close,
     };
+#ifndef _MSC_VER
     static constexpr unsigned int NbEvents = 4;
+#else
+    static const unsigned int NbEvents = 4;
+#endif
 
 public:
     ///
diff --git a/vlcpp/common.hpp b/vlcpp/common.hpp
index e6e8f6e..a514af6 100644
--- a/vlcpp/common.hpp
+++ b/vlcpp/common.hpp
@@ -24,6 +24,10 @@
 #ifndef LIBVLC_CXX_COMMON_H
 #define LIBVLC_CXX_COMMON_H
 
+#ifdef _MSC_VER
+using ssize_t = long int;
+#endif
+
 #include <vlc/vlc.h>
 #include <array>
 #include <cassert>
@@ -174,7 +178,7 @@ namespace VLC
 
     struct VaCopy
     {
-        VaCopy(va_list va_) noexcept
+        VaCopy(va_list va_)
         {
             va_copy( va, va_ );
         }
@@ -227,7 +231,11 @@ namespace VLC
         template <typename OpenCb, BoxingStrategy Strategy_>
         struct GuessBoxingStrategy
         {
+#ifndef _MSC_VER
             static constexpr BoxingStrategy Strategy = Strategy_;
+#else
+            static const BoxingStrategy Strategy = Strategy_;
+#endif
         };
 
         // In case the user provides a nullptr open callback, there's nothing
@@ -235,7 +243,11 @@ namespace VLC
         template <BoxingStrategy Strategy_>
         struct GuessBoxingStrategy<std::nullptr_t, Strategy_>
         {
+#ifndef _MSC_VER
             static constexpr BoxingStrategy Strategy = BoxingStrategy::None;
+#else
+            static const BoxingStrategy Strategy = BoxingStrategy::None;
+#endif
         };
 
         template <int NbEvents, BoxingStrategy Strategy>



More information about the vlc-commits mailing list