diff options
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 |