common_types: Include types within the Sirit namespace

Avoids dumping types into global scope.
This commit is contained in:
Lioncash 2019-10-06 14:25:11 -04:00 committed by Rodrigo Locatti
parent 6e14d37386
commit ab507033db

View file

@ -9,6 +9,8 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
namespace Sirit {
using u8 = std::uint8_t; using u8 = std::uint8_t;
using u16 = std::uint16_t; using u16 = std::uint16_t;
using u32 = std::uint32_t; using u32 = std::uint32_t;
@ -25,3 +27,5 @@ using f32 = float;
using f64 = double; using f64 = double;
static_assert(sizeof(f32) == sizeof(u32), "f32 must be 32 bits wide"); static_assert(sizeof(f32) == sizeof(u32), "f32 must be 32 bits wide");
static_assert(sizeof(f64) == sizeof(u64), "f64 must be 64 bits wide"); static_assert(sizeof(f64) == sizeof(u64), "f64 must be 64 bits wide");
} // namespace Sirit