Einzelnen Beitrag anzeigen

Dax
(Gast)

n/a Beiträge
 
#2

Re: Speicherbedarf 9 Boolean Werte ist TBitset eine Alternat

  Alt 26. Mai 2006, 12:03
Klar hab ich ne bessere Idee

Bau die TBitSet lokal nach:
Delphi-Quellcode:
type
  TFoo = class
  private
    fBoolFlags: Cardinal;
  public:
    property Bool1: Boolean read fBoolFlags and 1 = 1 write fBoolFlags := fBoolFlags or 1 shl 1;
    property Bool2: Boolean read fBoolFlags and 2 = 2 write fBoolFlags := fBoolFlags or 1 shl 2;
...
  end;
  Mit Zitat antworten Zitat