0x7CFE / llst

LLVM powered Little Smalltalk.
Other
93 stars 10 forks source link

Rewrite static_cast with TObject::cast<T>() #42

Open kpp opened 11 years ago

kpp commented 11 years ago
globals.nilObject->cast<TByteObject>();
newOrdinaryObject(klass, sizeof(TObjectArray) + dataSize * sizeof(TObject*))->cast<TObjectArray>();

vs

static_cast<TByteObject*>(globals.nilObject);
static_cast<TObjectArray*>( newOrdinaryObject(klass, sizeof(TObjectArray) + dataSize * sizeof(TObject*)) );