[Orxonox-commit 6199] r10857 - code/branches/cpp11_v2/src/libraries/network/packet
muemart at orxonox.net
muemart at orxonox.net
Wed Nov 25 14:20:01 CET 2015
Author: muemart
Date: 2015-11-25 14:20:01 +0100 (Wed, 25 Nov 2015)
New Revision: 10857
Modified:
code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.cc
code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h
Log:
Fix clang build for LANDiscoverable
Looks like name lookup for operator<< is wrong in gcc and msvc and
incorrectly found the overloaded operator in the orxonox namespace
Modified: code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.cc 2015-11-25 13:05:43 UTC (rev 10856)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.cc 2015-11-25 13:20:01 UTC (rev 10857)
@@ -86,11 +86,12 @@
} // namespace packet
- std::ostream& operator<<(std::ostream& out, const ENetAddress& address)
- {
- char addr[64];
- if (!enet_address_get_host_ip(&address, addr, 64))
- out << addr;
- return out;
- }
} // namespace orxonox
+
+std::ostream& operator<<(std::ostream& out, const ENetAddress& address)
+{
+ char addr[64];
+ if (!enet_address_get_host_ip(&address, addr, 64))
+ out << addr;
+ return out;
+}
Modified: code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h 2015-11-25 13:05:43 UTC (rev 10856)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ServerInformation.h 2015-11-25 13:20:01 UTC (rev 10857)
@@ -65,7 +65,8 @@
}
- _NetworkExport std::ostream& operator<<(std::ostream& out, const ENetAddress& address);
}
+_NetworkExport std::ostream& operator<<(std::ostream& out, const ENetAddress& address);
+
#endif // SERVERINFORMATION_H
More information about the Orxonox-commit
mailing list