diff options
| author | gazelleguardian <gazelleguardian8@gmail.com> | 2021-12-06 03:54:47 +0100 |
|---|---|---|
| committer | Philipp David <pd@3b.pm> | 2022-03-22 16:59:40 +0100 |
| commit | 691cea4b1a4aa1779c9ae88d88924e2fd3dcb6fd (patch) | |
| tree | 4395e412b2a19521f950e62446a4ea072bea83ce | |
| parent | dc72a20b7efd304d12af2025223fad07b4b78464 (diff) | |
| download | Project-Tick-691cea4b1a4aa1779c9ae88d88924e2fd3dcb6fd.tar.gz Project-Tick-691cea4b1a4aa1779c9ae88d88924e2fd3dcb6fd.zip | |
Fix building on windows with clang and msvc
Signed-off-by: Philipp David <pd@3b.pm>
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | include/io/stream_writer.h | 1 | ||||
| -rw-r--r-- | include/tag_array.h | 5 | ||||
| -rw-r--r-- | include/tag_list.h | 2 | ||||
| -rw-r--r-- | src/tag_array.cpp | 5 |
5 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1faa5dc034..fafeae4b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ if(DEFINED NBT_DEST_DIR) endif() if(NBT_USE_ZLIB) - target_link_libraries(${NBT_NAME} z) + target_link_libraries(${NBT_NAME} ZLIB::ZLIB) endif() set_property(TARGET ${NBT_NAME} PROPERTY CXX_STANDARD 11) generate_export_header(${NBT_NAME} BASE_NAME nbt) diff --git a/include/io/stream_writer.h b/include/io/stream_writer.h index b10f03adfa..a69508f392 100644 --- a/include/io/stream_writer.h +++ b/include/io/stream_writer.h @@ -23,6 +23,7 @@ #include "tag.h" #include "endian_str.h" #include <iosfwd> +#include <string> namespace nbt { diff --git a/include/tag_array.h b/include/tag_array.h index 6e6a92bbeb..bed84d8070 100644 --- a/include/tag_array.h +++ b/include/tag_array.h @@ -126,11 +126,6 @@ typedef tag_array<int8_t> tag_byte_array; typedef tag_array<int32_t> tag_int_array; typedef tag_array<int64_t> tag_long_array; -//Explicit instantiations -template class NBT_EXPORT tag_array<int8_t>; -template class NBT_EXPORT tag_array<int32_t>; -template class NBT_EXPORT tag_array<int64_t>; - } #endif // TAG_ARRAY_H_INCLUDED diff --git a/include/tag_list.h b/include/tag_list.h index ecd7e89c11..e2c9b7bb7c 100644 --- a/include/tag_list.h +++ b/include/tag_list.h @@ -215,7 +215,7 @@ void tag_list::init(std::initializer_list<Arg> init) el_type_ = T::type; tags.reserve(init.size()); for(const Arg& arg: init) - tags.emplace_back(make_unique<T>(arg)); + tags.emplace_back(nbt::make_unique<T>(arg)); } } diff --git a/src/tag_array.cpp b/src/tag_array.cpp index 4a1668ad1e..a48f52a9c2 100644 --- a/src/tag_array.cpp +++ b/src/tag_array.cpp @@ -126,4 +126,9 @@ void tag_array<int64_t>::write_payload(io::stream_writer& writer) const writer.write_num(i); } +//Explicit instantiations +template class NBT_EXPORT tag_array<int8_t>; +template class NBT_EXPORT tag_array<int32_t>; +template class NBT_EXPORT tag_array<int64_t>; + } |
