Fix gcc Wparentheses warnings

master
Cory Petkovsek 2019-06-18 12:13:44 +09:00
parent 67bdcbd048
commit 0b854725f0
3 changed files with 4 additions and 4 deletions

View File

@ -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()");

View File

@ -93,7 +93,7 @@ public:
template <typename Op_T>
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);

View File

@ -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();
}