From 0b854725f030d5106618a68acc33778a4eb2f875 Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+tinmanjuggernaut@users.noreply.github.com> Date: Tue, 18 Jun 2019 12:13:44 +0900 Subject: [PATCH] Fix gcc Wparentheses warnings --- terrain/voxel_map.cpp | 2 +- terrain/voxel_map.h | 2 +- util/zprofiling.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terrain/voxel_map.cpp b/terrain/voxel_map.cpp index c380fdac..b40d3cad 100644 --- a/terrain/voxel_map.cpp +++ b/terrain/voxel_map.cpp @@ -220,7 +220,7 @@ void VoxelMap::get_buffer_copy(Vector3i min_pos, VoxelBuffer &dst_buffer, unsign void VoxelMap::clear() { const Vector3i *key = NULL; - while (key = _blocks.next(key)) { + while ((key = _blocks.next(key))) { VoxelBlock *block_ptr = _blocks.get(*key); if (block_ptr == NULL) { OS::get_singleton()->printerr("Unexpected NULL in VoxelMap::clear()"); diff --git a/terrain/voxel_map.h b/terrain/voxel_map.h index afae1703..7d38bcde 100644 --- a/terrain/voxel_map.h +++ b/terrain/voxel_map.h @@ -93,7 +93,7 @@ public: template void for_all_blocks(Op_T op) { const Vector3i *key = NULL; - while (key = _blocks.next(key)) { + while ((key = _blocks.next(key))) { VoxelBlock *block = _blocks.get(*key); if (block != NULL) { op(block); diff --git a/util/zprofiling.cpp b/util/zprofiling.cpp index 175a0cc7..5b3480eb 100644 --- a/util/zprofiling.cpp +++ b/util/zprofiling.cpp @@ -101,7 +101,7 @@ Dictionary ZProfileVar::serialize() { ZProfiler::~ZProfiler() { const String *key = NULL; - while (key = _vars.next(key)) { + while ((key = _vars.next(key))) { ZProfileVar *v = _vars.get(*key); memdelete(v); } @@ -133,7 +133,7 @@ void ZProfiler::end(String key) { Dictionary ZProfiler::get_all_serialized_info() const { Dictionary d; const String *key = NULL; - while (key = _vars.next(key)) { + while ((key = _vars.next(key))) { ZProfileVar *v = _vars.get(*key); d[*key] = v->serialize(); }