summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-03-29 15:01:23 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-03-29 15:01:23 +0300
commitf4d8ea0fa76174843adf7f77ebad0ad17d2377ed (patch)
treef3f415004dbd311d020d077a7c9a2ec1d5726c03
parentbc952e1298e7aba15a7e97df521b8fc57efd5d73 (diff)
downloadProject-Tick-f4d8ea0fa76174843adf7f77ebad0ad17d2377ed.tar.gz
Project-Tick-f4d8ea0fa76174843adf7f77ebad0ad17d2377ed.zip
NOISSUE fix declarations
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
-rw-r--r--include/tag_primitive.h14
-rw-r--r--src/tag.cpp8
2 files changed, 15 insertions, 7 deletions
diff --git a/include/tag_primitive.h b/include/tag_primitive.h
index 938ec51087..a2da0cfab9 100644
--- a/include/tag_primitive.h
+++ b/include/tag_primitive.h
@@ -83,13 +83,13 @@ typedef tag_primitive<int64_t> tag_long;
typedef tag_primitive<float> tag_float;
typedef tag_primitive<double> tag_double;
-//Explicit instantiations
-template class NBT_EXPORT tag_primitive<int8_t>;
-template class NBT_EXPORT tag_primitive<int16_t>;
-template class NBT_EXPORT tag_primitive<int32_t>;
-template class NBT_EXPORT tag_primitive<int64_t>;
-template class NBT_EXPORT tag_primitive<float>;
-template class NBT_EXPORT tag_primitive<double>;
+//Explicit instantiation declarations
+extern template class NBT_EXPORT tag_primitive<int8_t>;
+extern template class NBT_EXPORT tag_primitive<int16_t>;
+extern template class NBT_EXPORT tag_primitive<int32_t>;
+extern template class NBT_EXPORT tag_primitive<int64_t>;
+extern template class NBT_EXPORT tag_primitive<float>;
+extern template class NBT_EXPORT tag_primitive<double>;
template<class T>
void tag_primitive<T>::read_payload(io::stream_reader& reader)
diff --git a/src/tag.cpp b/src/tag.cpp
index 6175a36293..0446dfd3f8 100644
--- a/src/tag.cpp
+++ b/src/tag.cpp
@@ -32,6 +32,14 @@
namespace nbt
{
+//Explicit instantiation definitions for tag_primitive
+template class tag_primitive<int8_t>;
+template class tag_primitive<int16_t>;
+template class tag_primitive<int32_t>;
+template class tag_primitive<int64_t>;
+template class tag_primitive<float>;
+template class tag_primitive<double>;
+
static_assert(std::numeric_limits<float>::is_iec559 && std::numeric_limits<double>::is_iec559,
"The floating point values for NBT must conform to IEC 559/IEEE 754");