source/game/obj/object.h: don't complain about int overflow

./source/game/obj/object.h:19:49: warning: result of ‘(255 << 26)’ requires 35 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
 const unsigned ObjectTypeMask = (unsigned)(0xFF << ObjectTypeBitOffset);
                                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Sergey Alirzaev
2018-09-26 11:41:34 +03:00
parent ba99a9a308
commit 75eac05e2e
+1 -1
View File
@@ -16,7 +16,7 @@
#endif
const unsigned ObjectTypeBitOffset = 26;
const unsigned ObjectTypeMask = (unsigned)(0xFF << ObjectTypeBitOffset);
const unsigned ObjectTypeMask = 0xFFU << ObjectTypeBitOffset;
const unsigned ObjectIDMask = 0xFFFFFFFF >> (32 - ObjectTypeBitOffset);
extern unsigned ObjectTypeCount;