10-04-2014, 08:02 PM
(This post was last modified: 10-04-2014, 08:36 PM by daniel0916.)
Okay, i will change the value who is defined in this method in the method. So i need a reference. But i can't set a default value when it's a reference. But how can i make it then?
Or isn't there a method to use reference with a default value?
Edit: I removed now the default value and the error is fixed.
Now i have only one error:
error: no matching function for call to ‘cPacketModifier::Run(cPacketModifier::ePacketSide, UInt32&, UInt32&, UInt32&, cByteBuffer&, cByteBuffer&, cPacketModifier::ePacketSide&)’
And the Code is:
I think why it isn't a reference. But i can't build a reference because when i use this: "cPacketModifier::ePacketSide & PacketStreamSide = cPacketModifier::E_SERVER_PACKET;" E_SERVER_PACKET isn't ePacketSide&
Or isn't there a method to use reference with a default value?
Edit: I removed now the default value and the error is fixed.
Now i have only one error:
error: no matching function for call to ‘cPacketModifier::Run(cPacketModifier::ePacketSide, UInt32&, UInt32&, UInt32&, cByteBuffer&, cByteBuffer&, cPacketModifier::ePacketSide&)’
And the Code is:
Code:
cPacketModifier::ePacketSide PacketStreamSide = cPacketModifier::E_SERVER_PACKET;
m_PacketModifier->Run(cPacketModifier::E_CLIENT_PACKET, PacketType, PacketLen, PacketReadSoFar, m_ClientBuffer, ToServer, PacketStreamSide);
Code:
void Run(ePacketSide a_PacketSide, UInt32 a_PacketID, cByteBuffer & a_InputStream, cByteBuffer & a_OutputStream, ePacketSide & a_PacketStreamSide);
I think why it isn't a reference. But i can't build a reference because when i use this: "cPacketModifier::ePacketSide & PacketStreamSide = cPacketModifier::E_SERVER_PACKET;" E_SERVER_PACKET isn't ePacketSide&