From 53e6db5683078735d20c6532b8f23bf79c7eb828 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 27 Oct 2013 21:47:49 -0700 Subject: [PATCH] remove return from middle of function --- xwords4/common/model.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/xwords4/common/model.c b/xwords4/common/model.c index a278b4987..8016f4fb7 100644 --- a/xwords4/common/model.c +++ b/xwords4/common/model.c @@ -596,6 +596,7 @@ model_getTile( const ModelCtxt* model, XP_U16 col, XP_U16 row, { CellTile cellTile = getModelTileRaw( model, col, row ); XP_Bool pending = XP_FALSE; + XP_Bool inUse = XP_TRUE; if ( (cellTile & TILE_PENDING_BIT) != 0 ) { if ( getPending @@ -609,24 +610,22 @@ model_getTile( const ModelCtxt* model, XP_U16 col, XP_U16 row, } /* this needs to happen after the above b/c cellTile gets changed */ - if ( (cellTile & TILE_EMPTY_BIT) != 0 ) { - return XP_FALSE; + inUse = 0 == (cellTile & TILE_EMPTY_BIT); + if ( inUse ) { + if ( NULL != tileP ) { + *tileP = cellTile & TILE_VALUE_MASK; + } + if ( NULL != isBlank ) { + *isBlank = IS_BLANK(cellTile); + } + if ( NULL != pendingP ) { + *pendingP = pending; + } + if ( !!recentP ) { + *recentP = (cellTile & PREV_MOVE_BIT) != 0; + } } - - if ( NULL != tileP ) { - *tileP = cellTile & TILE_VALUE_MASK; - } - if ( NULL != isBlank ) { - *isBlank = IS_BLANK(cellTile); - } - if ( NULL != pendingP ) { - *pendingP = pending; - } - if ( !!recentP ) { - *recentP = (cellTile & PREV_MOVE_BIT) != 0; - } - - return XP_TRUE; + return inUse; } /* model_getTile */ void