Created
February 4, 2014 15:20
-
-
Save Amanieu/8805643 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/common/IPC.h b/src/common/IPC.h | |
index cab883f..d1fcaee 100644 | |
--- a/src/common/IPC.h | |
+++ b/src/common/IPC.h | |
@@ -209,7 +209,7 @@ template<> struct SerializeTraits<std::string> { | |
}; | |
// IPC message, which automatically serializes and deserializes objects | |
-template<typename... T> class Message { | |
+template<uint32_t Major, uint32_t Minor, typename... T> class Message { | |
typedef std::tuple<T...> TupleType; | |
template<size_t Index, typename Tuple> static void FillTuple(Tuple&, Reader&) {} | |
@@ -240,6 +240,8 @@ public: | |
template<typename... Args> static void Serialize(Writer& stream, Args&&... args) | |
{ | |
static_assert(sizeof...(Args) == sizeof...(T), "Incorrect number of arguments for IPC::Message::Serialize"); | |
+ SerializeTraits<uint32_t>::Write(stream, Major); | |
+ SerializeTraits<uint32_t>::Write(stream, Minor); | |
SerializeImpl<0>(stream, std::forward<Args>(args)...); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment