* tests/test_cpp.cc (D::CleanUp, main): Use static_cast instead of
C-style pointer cast.
D( int iArg ): i( iArg ) {
nAllocated++;}
static void CleanUp( void* obj, void* data ) {
- D* self = (D*) obj;
+ D* self = static_cast<D*>(obj);
nFreed++;
my_assert( self->i == (int) (GC_word) data );}
static void Test() {
/* Make sure the uncollectible As and Bs are still there. */
for (i = 0; i < 1000; i++) {
- A* a = (A*) Undisguise( as[ i ] );
- B* b = (B*) Undisguise( bs[ i ] );
+ A* a = static_cast<A*>(Undisguise(as[i]));
+ B* b = static_cast<B*>(Undisguise(bs[i]));
a->Test( i );
delete a;
b->Test( i );