Merge pull request #138 from thedax/master

Update native for 2013, part deux.
This commit is contained in:
Henrik Rydgård committed 2013-09-17 07:20:00 -07:00
commit 0eb04be8a6
2 files changed
+23 -1

No files matched your search

+12
View File
@@ -3,6 +3,18 @@
#include <stdint.h>
#include <stdlib.h> // for byte swapping
#ifdef _WIN32
// We need this to compile without hundreds of std::bind errors in Visual Studio 2012
// since by default VARIADIC_MAX is something low like 3, 4, or 5.
// It's a good idea to include this file wherever std::bind is being used with more than 3, 4 or 5 args.
// Visual Studio 2013 doesn't need this after all, so we can simply check for equality.
#if _MSC_VER == 1700
#undef _VARIADIC_MAX
#define _VARIADIC_MAX 10
#endif
#endif
#ifdef _WIN32
#pragma warning(disable:4244)
#pragma warning(disable:4996)
+11 -1
View File
@@ -245,7 +245,17 @@ private:
void Run() { func(); }
private:
// Visual Studio 2012 needs this, or else it complains about losing const-volatile qualifiers.
// Both Visual Studio 2012 & 2013 need the following ifdef, or else they complain about losing const-volatile qualifiers:
// Error 23 error C3848: expression having type 'const std::_Bind<true,void,void
//(__cdecl *const )(PrioritizedWorkQueue *),PrioritizedWorkQueue *&>' would lose some const-volatile qualifiers in order to call 'void std::_Bind<true,void,void (__cdecl *const )(PrioritizedWorkQueue *),PrioritizedWorkQueue *&>::operator ()<>(void)' (thread\prioritizedworkqueue.cpp)
// Error 24 error C3848: expression having type 'const std::_Bind<true,void,std::_Pmf_wrap<void (__cdecl WorkerThread::* )(void),void,WorkerThread,>,WorkerThread *const >'
// would lose some const-volatile qualifiers in order to call
// 'void std::_Bind<true,void,std::_Pmf_wrap<void (__cdecl WorkerThread::* )(void),void,WorkerThread,>,WorkerThread *const >::operator ()<>(void)' (thread\threadpool.cpp)
// Error 25 error C3848 : expression having type 'const std::_Bind<true,void,std::_Pmf_wrap<void (__cdecl http::Download::* )(std::shared_ptr<http::Download>),void,http::Download,std::shared_ptr<http::Download>>,http::Download *const ,std::shared_ptr<http::Download> &>'
// would lose some const - volatile qualifiers in order to call
// 'void std::_Bind<true,void,std::_Pmf_wrap<void (__cdecl http::Download::* )(std::shared_ptr<http::Download>),void,http::Download,std::shared_ptr<http::Download>>,http::Download *const ,std::shared_ptr<http::Download> &>::operator ()<>(void)' (net\http_client.cpp)
#if _MSC_VER >= 1700
C func;
#else