diff options
| author | Matt Corallo <[email protected]> | 2012-07-04 16:40:16 +0200 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2012-07-04 16:40:16 +0200 |
| commit | 24154ed64b70ac3c9fdceb6b53f1746b91e53bfa (patch) | |
| tree | 5b2bb12ea0a41e916a7a1653053d1438b76796ce /src/protocol.h | |
| parent | Merge pull request #1512 from jgarzik/json-batch (diff) | |
| download | discoin-24154ed64b70ac3c9fdceb6b53f1746b91e53bfa.tar.xz discoin-24154ed64b70ac3c9fdceb6b53f1746b91e53bfa.zip | |
Fix remaining warnings.
Diffstat (limited to 'src/protocol.h')
| -rw-r--r-- | src/protocol.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/protocol.h b/src/protocol.h index b516f1b89..36f8b144c 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -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; |