From 33a05cc8ef8941e94d1458991f10f9df955f894b Mon Sep 17 00:00:00 2001 From: Roman Shishkin <spark@uwtech.org> Date: Thu, 16 May 2019 18:01:01 +0300 Subject: [PATCH] Fix clang-tidy warning about NBT tag --- src/World/ChunkData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/World/ChunkData.cpp b/src/World/ChunkData.cpp index 7eb8ea4..6cb73b5 100644 --- a/src/World/ChunkData.cpp +++ b/src/World/ChunkData.cpp @@ -87,7 +87,7 @@ void ChunkData::inflateChunk(Buffer buffer) { void ChunkData::parseChunk() { Buffer nbt(data.get(), len); std::pair<std::string, std::shared_ptr<const NBT::Tag>> tag = NBT::Tag::readNamedTag(&nbt); - if (tag.first != "") + if (!tag.first.empty()) throw std::invalid_argument("invalid root tag"); root = assertValue(std::dynamic_pointer_cast<const NBT::CompoundTag>(tag.second));