Raised This Month: $319 Target: $400
 79%   Almost there!

[TUT] Bits, Bit-fields, and Bit-wise Operators

Post New Thread Reply   
Thread Tools Display Modes
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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 20:34.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode