1 bit BOOL

Started by
12 comments, last by OneStiffRod 20 years, 9 months ago
Technically, C++ cannot allocate anything smaller than a char which generally 1 byte (but doesn''t have to be!)

Bitfields are really just a shorthand way of doing bit operations on a larger amount of data. As someone else pointed out, they are really only useful if you need lots of them and want to save some space.
Advertisement
Thnx to: SilverMace && Anonymous

That explains it pretty good -- I think I can reduce my boolean values a ton by using integer flags -- this way I can just put one int value in my classes and AND the flags together to get the boolean settings - that should create significant savings.

The classes themselves aren''t that consuming space or time wise but if you have a 1000 or more instances of them even the tiny flaws showup big.
Rocco is the Boy!
np
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
quote:Original post by silvermace
comments:
Programmer Four - try tellling him WHY (see the title "for BEGINNERS")


We can''t all be all right all the time. For instance, you have three l''s in "telling"

This topic is closed to new replies.

Advertisement