Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Cleanup|libcore: Renamed serialization protocol version enums
Each enum value now describes the change that took place, making
it easier to keep track of the evolution of the protocol.
  • Loading branch information
skyjake committed Jun 13, 2014
1 parent e30fec8 commit 7bc9b46
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions doomsday/libcore/include/de/libcore.h
Expand Up @@ -481,12 +481,23 @@ enum ClockDirection {
*/
enum ProtocolVersion {
DENG2_PROTOCOL_1_9_10 = 0,

DENG2_PROTOCOL_1_10_0 = 0,
DENG2_PROTOCOL_1_11_0_BUILD_926 = 1, // Time serilization changed

DENG2_PROTOCOL_1_11_0_Time_high_performance = 1,
DENG2_PROTOCOL_1_11_0 = 1,
DENG2_PROTOCOL_1_14_0_BUILD_1099 = 2, // LogEntry serialization changed

DENG2_PROTOCOL_1_12_0 = 1,

DENG2_PROTOCOL_1_13_0 = 1,

DENG2_PROTOCOL_1_14_0_LogEntry_metadata = 2,
DENG2_PROTOCOL_1_14_0 = 2,
DENG2_PROTOCOL_LATEST = DENG2_PROTOCOL_1_14_0

DENG2_PROTOCOL_1_15_0_NameExpression_with_scope_identifier = 3,
DENG2_PROTOCOL_1_15_0 = 3,

DENG2_PROTOCOL_LATEST = DENG2_PROTOCOL_1_15_0
};

//@{
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libcore/src/core/log.cpp
Expand Up @@ -538,7 +538,7 @@ void LogEntry::operator << (Reader &from)
>> _section
>> _format;

if(from.version() >= DENG2_PROTOCOL_1_14_0_BUILD_1099)
if(from.version() >= DENG2_PROTOCOL_1_14_0_LogEntry_metadata)
{
// This version adds context information to the entry.
from.readAs<duint32>(_metadata);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libcore/src/data/time.cpp
Expand Up @@ -429,7 +429,7 @@ void Time::operator >> (Writer &to) const

void Time::operator << (Reader &from)
{
if(from.version() >= DENG2_PROTOCOL_1_11_0_BUILD_926)
if(from.version() >= DENG2_PROTOCOL_1_11_0_Time_high_performance)
{
/*
* Starting from build 926, Time can optionally contain a
Expand Down

0 comments on commit 7bc9b46

Please sign in to comment.