From 0fbe3bf2281aaa091173d7acd1cc017b3d60bf7b Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Tue, 16 Jan 2024 14:31:58 -0500 Subject: [PATCH] BLT rust like types because std::.... is too long --- include/blt/std/types.h | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/blt/std/types.h diff --git a/include/blt/std/types.h b/include/blt/std/types.h new file mode 100644 index 0000000..34dfa99 --- /dev/null +++ b/include/blt/std/types.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (C) 2024 Brett Terpstra + * + * 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 3 of the License, or + * (at your option) 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 . + */ + +#ifndef BLT_TYPES_H +#define BLT_TYPES_H + +#include + +#ifndef NO_BLT_NAMESPACE_ON_TYPES +namespace blt +{ +#endif + using i8 = std::int8_t; + using i16 = std::int16_t; + using i32 = std::int32_t; + using i64 = std::int64_t; + + using u8 = std::uint8_t; + using u16 = std::uint16_t; + using u32 = std::uint32_t; + using u64 = std::uint64_t; + + using size_t = std::size_t; +#ifndef NO_BLT_NAMESPACE_ON_TYPES +} +#endif + +#endif //BLT_TYPES_H