From: Dale Weiler Date: Thu, 24 Nov 2016 19:54:17 +0000 (+0000) Subject: Cleaner way to set the mask for -Wunused-component X-Git-Tag: xonotic-v0.8.5~47 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a5636899f24251bf08125c99b14b16030f978d4f;p=xonotic%2Fgmqcc.git Cleaner way to set the mask for -Wunused-component --- diff --git a/ir.cpp b/ir.cpp index f5bc452..6f06bdf 100644 --- a/ir.cpp +++ b/ir.cpp @@ -638,7 +638,7 @@ bool ir_function_finalize(ir_function *self) // claiming it's unused, otherwise skip the vector entierly if (v->m_vtype == TYPE_VECTOR) { - size_t mask = (1 << 0) | (1 << 1) | (1 << 2), bits = 0; + size_t mask = (1 << 3) - 1, bits = 0; for (size_t i = 0; i < 3; i++) if (!v->m_members[i] || (v->m_members[i]->m_reads.empty() && v->m_members[i]->m_writes.size()))