summarylogtreecommitdiffstats
path: root/0002-Fix-ambiguity-between-boost-and-std-make_shared.patch
blob: c859cd88750968b5395df949f0f6a5c152dfc8c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From 814708ac7f122f7a7b07f817a164fc7423d0ce6d Mon Sep 17 00:00:00 2001
From: Sandy Carter <bwrsandman@gmail.com>
Date: Sat, 24 Sep 2016 09:39:55 -0400
Subject: [PATCH] Fix ambiguity between boost and std make_shared

---
 client/Client.cpp  | 12 ++++++------
 lib/Connection.cpp |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/client/Client.cpp b/client/Client.cpp
index f01ff0e..22ab71b 100644
--- a/client/Client.cpp
+++ b/client/Client.cpp
@@ -451,7 +451,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
 			}
 			else 
 			{
-				installNewPlayerInterface(make_shared<CPlayerInterface>(color), color);
+				installNewPlayerInterface(std::make_shared<CPlayerInterface>(color), color);
 				humanPlayers++;
 			}
 		}
@@ -467,7 +467,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
 		if(!gNoGUI)
 		{
 			boost::unique_lock<boost::recursive_mutex> un(*LOCPLINT->pim);
-			auto p = make_shared<CPlayerInterface>(PlayerColor::NEUTRAL);
+			auto p = std::make_shared<CPlayerInterface>(PlayerColor::NEUTRAL);
 			p->observerInDuelMode = true;
 			installNewPlayerInterface(p, boost::none);
 			GH.curInt = p.get();
@@ -550,7 +550,7 @@ void CClient::serialize(CISer & h, const int version)
 			else
 			{
 				assert(isHuman);
-				nInt = make_shared<CPlayerInterface>(pid);
+				nInt = std::make_shared<CPlayerInterface>(pid);
 			}
 
 			nInt->dllName = dllname;
@@ -620,7 +620,7 @@ void CClient::serialize(CISer & h, const int version, const std::set<PlayerColor
 			else
 			{
 				assert(isHuman);
-				nInt = make_shared<CPlayerInterface>(pid);
+				nInt = std::make_shared<CPlayerInterface>(pid);
 			}
 
 			nInt->dllName = dllname;
@@ -866,7 +866,7 @@ void CClient::installNewPlayerInterface(shared_ptr<CGameInterface> gameInterface
 	playerint[colorUsed] = gameInterface;
 
 	logGlobal->traceStream() << boost::format("\tInitializing the interface for player %s") % colorUsed;
-	auto cb = make_shared<CCallback>(gs, color, this);
+	auto cb = std::make_shared<CCallback>(gs, color, this);
 	callbacks[colorUsed] = cb;
 	battleCallbacks[colorUsed] = cb;
 	gameInterface->init(cb);
@@ -887,7 +887,7 @@ void CClient::installNewBattleInterface(shared_ptr<CBattleGameInterface> battleI
 	if(needCallback)
 	{
 		logGlobal->traceStream() << boost::format("\tInitializing the battle interface for player %s") % *color;
-		auto cbc = make_shared<CBattleCallback>(gs, color, this);
+		auto cbc = std::make_shared<CBattleCallback>(gs, color, this);
 		battleCallbacks[colorUsed] = cbc;
 		battleInterface->init(cbc);
 	}
diff --git a/lib/Connection.cpp b/lib/Connection.cpp
index 0f6ca2e..9be8f79 100644
--- a/lib/Connection.cpp
+++ b/lib/Connection.cpp
@@ -440,7 +440,7 @@ CTypeList::TypeInfoPtr CTypeList::registerType( const std::type_info *type )
 		return typeDescr;  //type found, return ptr to structure
 
 	//type not found - add it to the list and return given ID
-	auto newType = make_shared<TypeDescriptor>();
+	auto newType = std::make_shared<TypeDescriptor>();
 	newType->typeID = typeInfos.size() + 1;
 	newType->name = type->name();
 	typeInfos[type] = newType;
-- 
2.9.3