Fix remaining warnings.

This commit is contained in:
Matt Corallo
2012-07-04 16:40:16 +02:00
parent c729dbb6d2
commit 24154ed64b
2 changed files with 13 additions and 5 deletions

View File

@@ -49,8 +49,16 @@ class CMessageHeader
// TODO: make private (improves encapsulation)
public:
enum { COMMAND_SIZE=12 };
char pchMessageStart[sizeof(::pchMessageStart)];
enum {
MESSAGE_START_SIZE=sizeof(::pchMessageStart),
COMMAND_SIZE=12,
MESSAGE_SIZE_SIZE=sizeof(int),
CHECKSUM_SIZE=sizeof(int),
MESSAGE_SIZE_OFFSET=MESSAGE_START_SIZE+COMMAND_SIZE,
CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE
};
char pchMessageStart[MESSAGE_START_SIZE];
char pchCommand[COMMAND_SIZE];
unsigned int nMessageSize;
unsigned int nChecksum;