From e0ca4d83991d80865781c1dbbbfa1f92259a366a Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 11 Aug 2019 11:39:43 +0200 Subject: Fix building with clang 8.0 (#4346) --- src/WorldStorage/FastNBT.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/WorldStorage/FastNBT.cpp') diff --git a/src/WorldStorage/FastNBT.cpp b/src/WorldStorage/FastNBT.cpp index 99148e126..110bc68c8 100644 --- a/src/WorldStorage/FastNBT.cpp +++ b/src/WorldStorage/FastNBT.cpp @@ -143,10 +143,12 @@ std::error_code make_error_code(eNBTParseError a_Err) NOEXCEPT // cParsedNBT: #define NEEDBYTES(N, ERR) \ - if (m_Length - m_Pos < static_cast(N)) \ - { \ - return ERR; \ - } + do { \ + if (m_Length - m_Pos < static_cast(N)) \ + { \ + return ERR; \ + } \ + } while (false) -- cgit v1.2.3