From 98cf4025ce103f9dc138b0dca19117d60c5e5f8f Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 28 Nov 2020 20:49:33 +0000 Subject: BlockInfo: float-equal for Clang only --- src/BlockInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index d6c95f6a6..76ca420e2 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -838,13 +838,17 @@ bool cBlockInfo::FullyOccupiesVoxel(const BLOCKTYPE Block) bool cBlockInfo::IsOneHitDig(const BLOCKTYPE Block) { +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wfloat-equal" +#endif // GetHardness returns exactly 0 for one hit break blocks: return GetHardness(Block) == 0; +#ifdef __clang__ #pragma clang diagnostic pop +#endif } -- cgit v1.2.3