Преглед на файлове

Reflect changes in boost::asio released in Boost 1.66. (#428)

The service template parameters are disabled by default for now.
Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
Raphnalor преди 7 години
родител
ревизия
83c6ffbda0
променени са 4 файла, в които са добавени 19 реда и са изтрити 1 реда
  1. 3 0
      lib/serializer/Connection.cpp
  2. 6 0
      lib/serializer/Connection.h
  3. 3 0
      server/CVCMIServer.cpp
  4. 7 1
      server/CVCMIServer.h

+ 3 - 0
lib/serializer/Connection.cpp

@@ -14,6 +14,9 @@
 #include "../mapping/CMap.h"
 #include "../CGameState.h"
 
+#if BOOST_VERSION >= 106600
+#define BOOST_ASIO_ENABLE_OLD_SERVICES
+#endif
 #include <boost/asio.hpp>
 
 using namespace boost;

+ 6 - 0
lib/serializer/Connection.h

@@ -22,7 +22,13 @@ namespace boost
 		{
 			class tcp;
 		}
+
+#if BOOST_VERSION >= 106600  // Boost version >= 1.66
+		class io_context;
+		typedef io_context io_service;
+#else
 		class io_service;
+#endif
 
 		template <typename Protocol> class stream_socket_service;
 		template <typename Protocol,typename StreamSocketService>

+ 3 - 0
server/CVCMIServer.cpp

@@ -9,6 +9,9 @@
  */
 #include "StdInc.h"
 
+#if BOOST_VERSION >= 106600
+#define BOOST_ASIO_ENABLE_OLD_SERVICES
+#endif
 #include <boost/asio.hpp>
 
 #include "../lib/filesystem/Filesystem.h"

+ 7 - 1
server/CVCMIServer.h

@@ -26,7 +26,13 @@ namespace boost
 		{
 			class tcp;
 		}
-		class io_service;
+
+#if BOOST_VERSION >= 106600  // Boost version >= 1.66
+		class io_context;
+		typedef io_context io_service;
+#else
+		class io_service;
+#endif
 
 		template <typename Protocol> class stream_socket_service;
 		template <typename Protocol,typename StreamSocketService>