Created
April 13, 2020 14:36
-
-
Save danlark1/fb6603b7144311f786d6d602c0eb3104 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
template <class T> | |
T Deserialize(const void* memory) { | |
T t; | |
memcpy(&t, memory, sizeof(T)); | |
return t; | |
} | |
template <class T> | |
void Serialize(const T& t, void* memory) { | |
memcpy(memory, &t, sizeof(T)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment