Created
December 30, 2015 14:13
-
-
Save pmiddend/42f15b08384b22cbb6bf 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
| fcppt::optional<level_actor> | |
| load_actor(std::istream &s) | |
| { | |
| auto id = fcppt::io::read<level_actor::id_type>(s,fcppt::endianness::format::little); | |
| auto pos_x = fcppt::io::read<level_actor::pos_type>(s,fcppt::endianness::format::little); | |
| auto pos_y = fcppt::io::read<level_actor::pos_type>(s,fcppt::endianness::format::little); | |
| return | |
| fcppt::optional_apply( | |
| []( | |
| level_actor::id_type const _id, | |
| level_actor::pos_type const _pos_x, | |
| level_actor::pos_type const _pos_y) | |
| { | |
| return level_actor{_id,_pos_x,_pos_y}; | |
| }, | |
| id, | |
| pos_x, | |
| pos_y); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment