View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-19-2021 , 11:12   Re: [TUT] Bits, Bit-fields, and Bit-wise Operators
Reply With Quote #101

I'm struggling to find the benefit/reason for a bit-sum here, you could use a global integer for this, as fysiks suggested. An integer would always only cost 32 bits of memory, where if you want to expand your bit-sum over 32 bits, you are immediately moving to 64-bits, more memory than what just an integer would use. Not that a few bytes of memory consumption would make or break your plugin, but it would be simpler the integer way since you do not need to use the bit operators.

new EnumName:g_enRoundType;

g_enRoundType = R_NONE;
g_enRoundType = R_TYPE55;
__________________

Last edited by Bugsy; 09-19-2021 at 11:17.
Bugsy is offline