diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-20 10:24:26 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-20 10:24:26 (GMT) |
commit | b4384bde09c72dde1620478c98fc20eb76529f3f (patch) | |
tree | 59a7bca1f9b8e77138cb0b28ae7848356f3252c8 /Swiften/Serializer | |
parent | edeab9429a996aa5641cfb9c4b3fc1386b49d81f (diff) | |
download | swift-contrib-b4384bde09c72dde1620478c98fc20eb76529f3f.zip swift-contrib-b4384bde09c72dde1620478c98fc20eb76529f3f.tar.bz2 |
Made compilation of whiteboard components warning free
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp index c5e3d4f..1a9d761 100644 --- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp @@ -184,7 +184,22 @@ namespace Swift { } std::string WhiteboardSerializer::typeToString(WhiteboardPayload::Type type) const { - if(type == WhiteboardPayload::Data) { + switch (type) { + case WhiteboardPayload::Data: + return "data"; + case WhiteboardPayload::SessionRequest: + return "session-request"; + case WhiteboardPayload::SessionAccept: + return "session-accept"; + case WhiteboardPayload::SessionTerminate: + return "session-terminate"; + case WhiteboardPayload::UnknownType: + std::cerr << "Serializing unknown action value." << std::endl; + return ""; + } + assert(false); + return ""; +/* if (type == WhiteboardPayload::Data) { return ""; } else if (type == WhiteboardPayload::SessionRequest) { return "session-request"; @@ -192,6 +207,6 @@ namespace Swift { return "session-accept"; } else if (type == WhiteboardPayload::SessionTerminate) { return "session-terminate"; - } + } else*/ } } |