summaryrefslogtreecommitdiffstats
path: root/depends/libnbtplusplus/include
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-10 00:16:33 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-10 00:16:33 +0200
commit877fc94f507785e6a982b5f7ad86490f9a7821bb (patch)
treeeb19799da2c871b8972b7d72994267b1f28d0b7c /depends/libnbtplusplus/include
parentdb5816b0a20aac63fb97188ea2034903db254bfa (diff)
downloadMultiMC-877fc94f507785e6a982b5f7ad86490f9a7821bb.tar
MultiMC-877fc94f507785e6a982b5f7ad86490f9a7821bb.tar.gz
MultiMC-877fc94f507785e6a982b5f7ad86490f9a7821bb.tar.lz
MultiMC-877fc94f507785e6a982b5f7ad86490f9a7821bb.tar.xz
MultiMC-877fc94f507785e6a982b5f7ad86490f9a7821bb.zip
GH-1232 attempt to fix reading NBT longs on OSX
EXPORT ALL THE THINGS
Diffstat (limited to 'depends/libnbtplusplus/include')
-rw-r--r--depends/libnbtplusplus/include/tag_compound.h6
-rw-r--r--depends/libnbtplusplus/include/tag_primitive.h16
2 files changed, 14 insertions, 8 deletions
diff --git a/depends/libnbtplusplus/include/tag_compound.h b/depends/libnbtplusplus/include/tag_compound.h
index 5ec818a3..66fe18b4 100644
--- a/depends/libnbtplusplus/include/tag_compound.h
+++ b/depends/libnbtplusplus/include/tag_compound.h
@@ -124,9 +124,9 @@ public:
void read_payload(io::stream_reader& reader) override;
void write_payload(io::stream_writer& writer) const override;
- friend bool operator==(const tag_compound& lhs, const tag_compound& rhs)
+ NBT___EXPORT friend bool operator==(const tag_compound& lhs, const tag_compound& rhs)
{ return lhs.tags == rhs.tags; }
- friend bool operator!=(const tag_compound& lhs, const tag_compound& rhs)
+ NBT___EXPORT friend bool operator!=(const tag_compound& lhs, const tag_compound& rhs)
{ return !(lhs == rhs); }
private:
@@ -134,7 +134,7 @@ private:
};
template<class T, class... Args>
-std::pair<tag_compound::iterator, bool> tag_compound::emplace(const std::string& key, Args&&... args)
+NBT___EXPORT std::pair<tag_compound::iterator, bool> tag_compound::emplace(const std::string& key, Args&&... args)
{
return put(key, value(make_unique<T>(std::forward<Args>(args)...)));
}
diff --git a/depends/libnbtplusplus/include/tag_primitive.h b/depends/libnbtplusplus/include/tag_primitive.h
index 8b70c147..c83e695e 100644
--- a/depends/libnbtplusplus/include/tag_primitive.h
+++ b/depends/libnbtplusplus/include/tag_primitive.h
@@ -38,7 +38,7 @@ namespace nbt
* Common class for tag_byte, tag_short, tag_int, tag_long, tag_float and tag_double.
*/
template<class T>
-class tag_primitive final : public detail::crtp_tag<tag_primitive<T>>
+class NBT___EXPORT tag_primitive final : public detail::crtp_tag<tag_primitive<T>>
{
public:
///The type of the value
@@ -66,10 +66,16 @@ private:
T value;
};
-template<class T> bool operator==(const tag_primitive<T>& lhs, const tag_primitive<T>& rhs)
-{ return lhs.get() == rhs.get(); }
-template<class T> bool operator!=(const tag_primitive<T>& lhs, const tag_primitive<T>& rhs)
-{ return !(lhs == rhs); }
+template<class T>
+NBT___EXPORT bool operator==(const tag_primitive<T>& lhs, const tag_primitive<T>& rhs)
+{
+ return lhs.get() == rhs.get();
+}
+template<class T>
+NBT___EXPORT bool operator!=(const tag_primitive<T>& lhs, const tag_primitive<T>& rhs)
+{
+ return !(lhs == rhs);
+}
//Typedefs that should be used instead of the template tag_primitive.
typedef tag_primitive<int8_t> tag_byte;