mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
make formal params const where possible
This commit is contained in:
parent
4322fd2820
commit
41a36b2352
2 changed files with 20 additions and 19 deletions
|
@ -99,8 +99,8 @@ dict_numTileFaces( const DictionaryCtxt* dict )
|
|||
} /* dict_numTileFaces */
|
||||
|
||||
XP_U16
|
||||
dict_tilesToString( const DictionaryCtxt* ctxt, Tile* tiles, XP_U16 nTiles,
|
||||
XP_UCHAR* buf, XP_U16 bufSize )
|
||||
dict_tilesToString( const DictionaryCtxt* ctxt, const Tile* tiles,
|
||||
XP_U16 nTiles, XP_UCHAR* buf, XP_U16 bufSize )
|
||||
{
|
||||
XP_UCHAR* bufp = buf;
|
||||
XP_UCHAR* end = bufp + bufSize;
|
||||
|
@ -139,7 +139,7 @@ dict_tilesToString( const DictionaryCtxt* ctxt, Tile* tiles, XP_U16 nTiles,
|
|||
} /* dict_tilesToString */
|
||||
|
||||
Tile
|
||||
dict_tileForString( DictionaryCtxt* dict, XP_UCHAR* key )
|
||||
dict_tileForString( const DictionaryCtxt* dict, const XP_UCHAR* key )
|
||||
{
|
||||
XP_U16 nFaces = dict_numTileFaces( dict );
|
||||
Tile tile;
|
||||
|
@ -160,7 +160,7 @@ dict_tileForString( DictionaryCtxt* dict, XP_UCHAR* key )
|
|||
} /* dict_tileForChar */
|
||||
|
||||
XP_Bool
|
||||
dict_tilesAreSame( DictionaryCtxt* dict1, DictionaryCtxt* dict2 )
|
||||
dict_tilesAreSame( const DictionaryCtxt* dict1, const DictionaryCtxt* dict2 )
|
||||
{
|
||||
XP_Bool result = XP_FALSE;
|
||||
|
||||
|
@ -355,7 +355,7 @@ dict_loadFromStream( DictionaryCtxt* dict, XWStreamCtxt* stream )
|
|||
} /* dict_loadFromStream */
|
||||
|
||||
XP_UCHAR*
|
||||
dict_getName( DictionaryCtxt* dict )
|
||||
dict_getName( const DictionaryCtxt* dict )
|
||||
{
|
||||
XP_ASSERT( !!dict );
|
||||
XP_ASSERT( !!dict->name );
|
||||
|
@ -363,14 +363,14 @@ dict_getName( DictionaryCtxt* dict )
|
|||
} /* dict_getName */
|
||||
|
||||
XP_Bool
|
||||
dict_faceIsBitmap( DictionaryCtxt* dict, Tile tile )
|
||||
dict_faceIsBitmap( const DictionaryCtxt* dict, Tile tile )
|
||||
{
|
||||
XP_UCHAR face = dict_getTileChar( dict, tile );
|
||||
return /* face != 0 && */IS_SPECIAL(face);
|
||||
} /* dict_faceIsBitmap */
|
||||
|
||||
XP_Bitmap
|
||||
dict_getFaceBitmap( DictionaryCtxt* dict, Tile tile, XP_Bool isLarge )
|
||||
dict_getFaceBitmap( const DictionaryCtxt* dict, Tile tile, XP_Bool isLarge )
|
||||
{
|
||||
SpecialBitmaps* bitmaps;
|
||||
XP_UCHAR face = dict_getTileChar( dict, tile );
|
||||
|
@ -485,7 +485,7 @@ make_stubbed_dict( MPFORMAL_NOCOMMA )
|
|||
#endif /* STUBBED_DICT */
|
||||
|
||||
static array_edge*
|
||||
dict_super_edge_for_index( DictionaryCtxt* dict, XP_U32 index )
|
||||
dict_super_edge_for_index( const DictionaryCtxt* dict, XP_U32 index )
|
||||
{
|
||||
array_edge* result;
|
||||
|
||||
|
@ -510,7 +510,7 @@ dict_super_edge_for_index( DictionaryCtxt* dict, XP_U32 index )
|
|||
} /* dict_edge_for_index */
|
||||
|
||||
static array_edge*
|
||||
dict_super_getTopEdge( DictionaryCtxt* dict )
|
||||
dict_super_getTopEdge( const DictionaryCtxt* dict )
|
||||
{
|
||||
return dict->topEdge;
|
||||
} /* dict_super_getTopEdge */
|
||||
|
|
|
@ -60,9 +60,9 @@ typedef struct SpecialBitmaps {
|
|||
struct DictionaryCtxt {
|
||||
void (*destructor)( DictionaryCtxt* dict );
|
||||
|
||||
array_edge* (*func_edge_for_index)( DictionaryCtxt* dict, XP_U32 index );
|
||||
array_edge* (*func_dict_getTopEdge)( DictionaryCtxt* dict );
|
||||
XP_UCHAR* (*func_dict_getShortName)( DictionaryCtxt* dict );
|
||||
array_edge* (*func_edge_for_index)( const DictionaryCtxt* dict, XP_U32 index );
|
||||
array_edge* (*func_dict_getTopEdge)( const DictionaryCtxt* dict );
|
||||
XP_UCHAR* (*func_dict_getShortName)( const DictionaryCtxt* dict );
|
||||
|
||||
array_edge* topEdge;
|
||||
array_edge* base; /* the physical beginning of the dictionary; not
|
||||
|
@ -123,7 +123,8 @@ struct DictionaryCtxt {
|
|||
#define dict_getShortName(d) (*((d)->func_dict_getShortName))(d)
|
||||
|
||||
|
||||
XP_Bool dict_tilesAreSame( DictionaryCtxt* dict1, DictionaryCtxt* dict2 );
|
||||
XP_Bool dict_tilesAreSame( const DictionaryCtxt* dict1,
|
||||
const DictionaryCtxt* dict2 );
|
||||
|
||||
XP_Bool dict_hasBlankTile( const DictionaryCtxt* dict );
|
||||
Tile dict_getBlankTile( const DictionaryCtxt* dict );
|
||||
|
@ -131,14 +132,14 @@ XP_U16 dict_getTileValue( const DictionaryCtxt* ctxt, Tile tile );
|
|||
XP_U16 dict_numTiles( const DictionaryCtxt* ctxt, Tile tile );
|
||||
XP_U16 dict_numTileFaces( const DictionaryCtxt* ctxt );
|
||||
|
||||
XP_U16 dict_tilesToString( const DictionaryCtxt* ctxt, Tile* tiles, XP_U16 nTiles,
|
||||
XP_UCHAR* buf, XP_U16 bufSize );
|
||||
XP_UCHAR* dict_getName( DictionaryCtxt* ctxt );
|
||||
XP_U16 dict_tilesToString( const DictionaryCtxt* ctxt, const Tile* tiles,
|
||||
XP_U16 nTiles, XP_UCHAR* buf, XP_U16 bufSize );
|
||||
XP_UCHAR* dict_getName( const DictionaryCtxt* ctxt );
|
||||
|
||||
Tile dict_tileForString( DictionaryCtxt* dict, XP_UCHAR* key );
|
||||
Tile dict_tileForString( const DictionaryCtxt* dict, const XP_UCHAR* key );
|
||||
|
||||
XP_Bool dict_faceIsBitmap( DictionaryCtxt* dict, Tile tile );
|
||||
XP_Bitmap dict_getFaceBitmap( DictionaryCtxt* dict, Tile tile,
|
||||
XP_Bool dict_faceIsBitmap( const DictionaryCtxt* dict, Tile tile );
|
||||
XP_Bitmap dict_getFaceBitmap( const DictionaryCtxt* dict, Tile tile,
|
||||
XP_Bool isLarge );
|
||||
|
||||
#ifdef TALL_FONTS
|
||||
|
|
Loading…
Reference in a new issue