summaryrefslogtreecommitdiff
path: root/include/primitive_detail.h
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 17:35:01 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 17:35:01 +0300
commit1a0ffe372f4da8408c5d08a36013536a3396b9e6 (patch)
tree440f2a9a325c9ab4cb5b16dc6a8193317cabf8d7 /include/primitive_detail.h
parentf4d8ea0fa76174843adf7f77ebad0ad17d2377ed (diff)
downloadProject-Tick-1a0ffe372f4da8408c5d08a36013536a3396b9e6.tar.gz
Project-Tick-1a0ffe372f4da8408c5d08a36013536a3396b9e6.zip
NOISSUE reformat libnbtplusplus to new MeshMC clang format rules
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'include/primitive_detail.h')
-rw-r--r--include/primitive_detail.h48
1 files changed, 35 insertions, 13 deletions
diff --git a/include/primitive_detail.h b/include/primitive_detail.h
index de070d3320..c55cd18398 100644
--- a/include/primitive_detail.h
+++ b/include/primitive_detail.h
@@ -32,21 +32,43 @@
namespace nbt
{
-namespace detail
-{
- ///Meta-struct that holds the tag_type value for a specific primitive type
- template<class T> struct get_primitive_type
- { static_assert(sizeof(T) != sizeof(T), "Invalid type paramter for tag_primitive, can only use types that NBT uses"); };
+ namespace detail
+ {
+ /// Meta-struct that holds the tag_type value for a specific primitive
+ /// type
+ template <class T> struct get_primitive_type {
+ static_assert(sizeof(T) != sizeof(T),
+ "Invalid type paramter for tag_primitive, can only "
+ "use types that NBT uses");
+ };
- template<> struct get_primitive_type<int8_t> : public std::integral_constant<tag_type, tag_type::Byte> {};
- template<> struct get_primitive_type<int16_t> : public std::integral_constant<tag_type, tag_type::Short> {};
- template<> struct get_primitive_type<int32_t> : public std::integral_constant<tag_type, tag_type::Int> {};
- template<> struct get_primitive_type<int64_t> : public std::integral_constant<tag_type, tag_type::Long> {};
- template<> struct get_primitive_type<float> : public std::integral_constant<tag_type, tag_type::Float> {};
- template<> struct get_primitive_type<double> : public std::integral_constant<tag_type, tag_type::Double> {};
-}
+ template <>
+ struct get_primitive_type<int8_t>
+ : public std::integral_constant<tag_type, tag_type::Byte> {
+ };
+ template <>
+ struct get_primitive_type<int16_t>
+ : public std::integral_constant<tag_type, tag_type::Short> {
+ };
+ template <>
+ struct get_primitive_type<int32_t>
+ : public std::integral_constant<tag_type, tag_type::Int> {
+ };
+ template <>
+ struct get_primitive_type<int64_t>
+ : public std::integral_constant<tag_type, tag_type::Long> {
+ };
+ template <>
+ struct get_primitive_type<float>
+ : public std::integral_constant<tag_type, tag_type::Float> {
+ };
+ template <>
+ struct get_primitive_type<double>
+ : public std::integral_constant<tag_type, tag_type::Double> {
+ };
+ } // namespace detail
-}
+} // namespace nbt
///@endcond
#endif // PRIMITIVE_DETAIL_H_INCLUDED