Created
February 27, 2019 06:16
-
-
Save sailfish009/f02b6a50b54b80be211434d749153cad to your computer and use it in GitHub Desktop.
This file contains hidden or 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<typename T> | |
| byte * toByteArray(T& t) | |
| { | |
| return (byte*)&t; | |
| }; | |
| template<typename T> | |
| void fromByteArray(T& t, byte *bytes) | |
| { | |
| t = *(T*)bytes; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment