From 1709c2aca7441abfc8c964e6286a39666aac215c Mon Sep 17 00:00:00 2001 From: gentlegiantJGC Date: Thu, 15 Aug 2024 11:46:33 +0100 Subject: [PATCH 1/2] Updated gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 57787b2e..b281c177 100644 --- a/.gitignore +++ b/.gitignore @@ -119,3 +119,8 @@ temp *.vs/ *.vcxproj* *.sln +*.ilk +*.exp +*.lib +*.pdb +src/x64/ From 8fcf6e457fa964d9663dc6023916593b43a4749a Mon Sep 17 00:00:00 2001 From: gentlegiantJGC Date: Thu, 15 Aug 2024 11:47:19 +0100 Subject: [PATCH 2/2] Added NamedTag equals function --- src/amulet_nbt/cpp/tag/eq.cpp | 4 ++++ src/amulet_nbt/include/amulet_nbt/tag/eq.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/amulet_nbt/cpp/tag/eq.cpp b/src/amulet_nbt/cpp/tag/eq.cpp index 01a2a530..b6dcb584 100644 --- a/src/amulet_nbt/cpp/tag/eq.cpp +++ b/src/amulet_nbt/cpp/tag/eq.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -92,4 +93,7 @@ namespace AmuletNBT{ } }, a); }; + bool NBTTag_eq(const AmuletNBT::NamedTag& a, const AmuletNBT::NamedTag& b) { + return a.name == b.name && NBTTag_eq(a.tag_node, b.tag_node); + }; } diff --git a/src/amulet_nbt/include/amulet_nbt/tag/eq.hpp b/src/amulet_nbt/include/amulet_nbt/tag/eq.hpp index a7a3c19b..d8d05bdd 100644 --- a/src/amulet_nbt/include/amulet_nbt/tag/eq.hpp +++ b/src/amulet_nbt/include/amulet_nbt/tag/eq.hpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace AmuletNBT { bool NBTTag_eq(const AmuletNBT::ByteTag& a, const AmuletNBT::ByteTag& b); @@ -23,4 +24,5 @@ namespace AmuletNBT { bool NBTTag_eq(const AmuletNBT::IntArrayTag& a, const AmuletNBT::IntArrayTag& b); bool NBTTag_eq(const AmuletNBT::LongArrayTag& a, const AmuletNBT::LongArrayTag& b); bool NBTTag_eq(const AmuletNBT::TagNode& a, const AmuletNBT::TagNode& b); + bool NBTTag_eq(const AmuletNBT::NamedTag& a, const AmuletNBT::NamedTag& b); }