Raised This Month: $ Target: $400
 0% 

How to safely set all bits in a bitflag?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-22-2009 , 15:11   How to safely set all bits in a bitflag?
Reply With Quote #1

I need to return a bitflag with all bits set. My first thought was to set it to '0xFFFFFFFF'. But then I realized in AMD64 cells have 64 bits. I'm not sure if this would set the most or the least significant bits. And unfortunately I don't have a 64bit processor to test it.

Would this work?

Code:
#if cellbits==32
    return 0xFFFFFFFF
#else
    return 0xFFFFFFFFFFFFFFFF
#endif
__________________

Community / No support through PM
danielkza is offline
 



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 01:39.


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