mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
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:
parent
c44a884184
commit
d000c430b9
1 changed files with 21 additions and 1 deletions
|
@ -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.
|
||||
*
|
||||
|
@ -36,6 +36,13 @@ struct PoolContext {
|
|||
MPSLOT
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
static void checkTilesLeft( const PoolContext* pool );
|
||||
#else
|
||||
# define checkTilesLeft( pool )
|
||||
#endif
|
||||
|
||||
|
||||
PoolContext*
|
||||
pool_make( MPFORMAL_NOCOMMA )
|
||||
{
|
||||
|
@ -247,5 +254,18 @@ pool_initFromDict( PoolContext* pool, DictionaryCtxt* dict )
|
|||
pool->blankIndex = -1;
|
||||
}
|
||||
#endif
|
||||
checkTilesLeft( pool );
|
||||
} /* 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue