diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-29 20:13:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-29 20:53:57 +0300 |
commit | 36c45ae7d8d2577a900ec266b64448d4b488013d (patch) | |
tree | 419024ce46e507c2abb0578d15d787093556b246 /src/utils/cast.h | |
parent | 864e023e0faeca5aa662023a54af7e4f9797fafa (diff) | |
download | mv-36c45ae7d8d2577a900ec266b64448d4b488013d.tar.gz mv-36c45ae7d8d2577a900ec266b64448d4b488013d.tar.bz2 mv-36c45ae7d8d2577a900ec266b64448d4b488013d.tar.xz mv-36c45ae7d8d2577a900ec266b64448d4b488013d.zip |
Move cast macroses into separate file.
Diffstat (limited to 'src/utils/cast.h')
-rw-r--r-- | src/utils/cast.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/utils/cast.h b/src/utils/cast.h new file mode 100644 index 000000000..9b6289ebc --- /dev/null +++ b/src/utils/cast.h @@ -0,0 +1,33 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef UTILS_CAST_H +#define UTILS_CAST_H + +#define CAST_8 static_cast<char> +#define CAST_S8 static_cast<int8_t> +#define CAST_U8 static_cast<uint8_t> +#define CAST_S16 static_cast<int16_t> +#define CAST_U16 static_cast<uint16_t> +#define CAST_S32 static_cast<int32_t> +#define CAST_U32 static_cast<uint32_t> +#define CAST_SIZE static_cast<size_t> + +#endif // UTILS_CAST_H |