thought there was an internal problem with pool and wrote debug-only

code to check.  There wasn't, and it's unused, but no point writing it
again.
This commit is contained in:
Andy2 2011-09-22 06:40:44 -07:00
parent c44a884184
commit d000c430b9

View file

@ -1,4 +1,4 @@
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */ /* -*- compile-command: "cd ../linux && make -j3 MEMDEBUG=TRUE"; -*- */
/* /*
* Copyright 2000 by Eric House (xwords@eehouse.org). All rights reserved. * Copyright 2000 by Eric House (xwords@eehouse.org). All rights reserved.
* *
@ -36,6 +36,13 @@ struct PoolContext {
MPSLOT MPSLOT
}; };
#ifdef DEBUG
static void checkTilesLeft( const PoolContext* pool );
#else
# define checkTilesLeft( pool )
#endif
PoolContext* PoolContext*
pool_make( MPFORMAL_NOCOMMA ) pool_make( MPFORMAL_NOCOMMA )
{ {
@ -247,5 +254,18 @@ pool_initFromDict( PoolContext* pool, DictionaryCtxt* dict )
pool->blankIndex = -1; pool->blankIndex = -1;
} }
#endif #endif
checkTilesLeft( pool );
} /* pool_initFromDict */ } /* pool_initFromDict */
#ifdef DEBUG
static void
checkTilesLeft( const PoolContext* pool )
{
XP_U16 ii, count;
for ( count = 0, ii = 0; ii < pool->numFaces; ++ii ) {
count += pool->lettersLeft[ii];
}
XP_ASSERT( count == pool->numTilesLeft );
}
#endif