- Timestamp:
- Nov 4, 2008, 5:12:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/packet/Packet.cc
r2112 r2132 53 53 #define _PACKETID 0 54 54 55 std::map< ENetPacket *, Packet *> Packet::packetMap_;55 std::map<size_t, Packet *> Packet::packetMap_; 56 56 57 57 Packet::Packet(){ … … 134 134 // Add the packet to a global list so we can access it again once enet calls our 135 135 // deletePacket method. We can of course only give a one argument function to the ENet C library. 136 packetMap_[ enetPacket_] = this;136 packetMap_[(size_t)(void*)enetPacket_] = this; 137 137 } 138 138 #ifndef NDEBUG … … 208 208 void Packet::deletePacket(ENetPacket *enetPacket){ 209 209 // Get our Packet from a gloabal map with all Packets created in the send() method of Packet. 210 std::map< ENetPacket*, Packet*>::iterator it = packetMap_.find(enetPacket);210 std::map<size_t, Packet*>::iterator it = packetMap_.find((size_t)enetPacket); 211 211 assert(it != packetMap_.end()); 212 212 // Make sure we don't delete it again in the destructor
Note: See TracChangeset
for help on using the changeset viewer.