Revert "GH-1232 attempt to fix reading NBT longs on OSX"
This reverts commit 877fc94f50
.
This commit is contained in:
parent
877fc94f50
commit
bd96a25f7a
@ -124,9 +124,9 @@ public:
|
||||
void read_payload(io::stream_reader& reader) override;
|
||||
void write_payload(io::stream_writer& writer) const override;
|
||||
|
||||
NBT___EXPORT friend bool operator==(const tag_compound& lhs, const tag_compound& rhs)
|
||||
friend bool operator==(const tag_compound& lhs, const tag_compound& rhs)
|
||||
{ return lhs.tags == rhs.tags; }
|
||||
NBT___EXPORT friend bool operator!=(const tag_compound& lhs, const tag_compound& rhs)
|
||||
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>
|
||||
NBT___EXPORT std::pair<tag_compound::iterator, bool> tag_compound::emplace(const std::string& key, Args&&... args)
|
||||
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)...)));
|
||||
}
|
||||
|
@ -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 NBT___EXPORT tag_primitive final : public detail::crtp_tag<tag_primitive<T>>
|
||||
class tag_primitive final : public detail::crtp_tag<tag_primitive<T>>
|
||||
{
|
||||
public:
|
||||
///The type of the value
|
||||
@ -66,16 +66,10 @@ private:
|
||||
T value;
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
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); }
|
||||
|
||||
//Typedefs that should be used instead of the template tag_primitive.
|
||||
typedef tag_primitive<int8_t> tag_byte;
|
||||
|
Loading…
Reference in New Issue
Block a user