From: Richard Harrison Date: Thu, 12 May 2016 10:05:28 +0000 (+0200) Subject: Fix MSVC10 compilation errors by using streams. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6171f750b0e11deed71db76fa4d2f1a32b260aa;p=flightgear.git Fix MSVC10 compilation errors by using streams. --- diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index de125aa0e..b78c452a0 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -816,7 +816,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) if (ptr + 2 >= msgEnd) { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated prop id: "+std::to_string((*it)->id)); + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated prop id: " << (*it)->id); break; } @@ -855,7 +855,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) if (len >= MAX_TEXT_SIZE) { len = MAX_TEXT_SIZE - 1; - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string "+std::to_string((*it)->id)); + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property truncated at MAX_TEXT_SIZE in string " << (*it)->id); } // XXX This should not be using 4 bytes per character! @@ -863,7 +863,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) // on the floor. if (ptr + 2 + ((len + 3) & ~3) >= msgEnd) { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string "+std::to_string((*it)->id)); + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer property not sent (no room) string " << (*it)->id); goto escape; } //cout << "String length unint32: " << len << "\n"; @@ -878,7 +878,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) { if (ptr + 2 >= msgEnd) { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string "+std::to_string((*it)->id)+" lcount "+std::to_string(lcount)); + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); break; } *ptr++ = XDR_encode_int8(*lcharptr); @@ -892,7 +892,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) { if (ptr + 2 >= msgEnd) { - SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string "+std::to_string((*it)->id)+" lcount "+std::to_string(lcount)); + SG_LOG(SG_NETWORK, SG_ALERT, "Multiplayer packet truncated in string " << (*it)->id << " lcount " << lcount); break; } *ptr++ = XDR_encode_int8(0);