mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
cleanup; fix compile of non-debug win32 version
This commit is contained in:
parent
9d18e8df95
commit
c956b0858a
5 changed files with 11 additions and 12 deletions
|
@ -27,6 +27,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NG_NUM_COLS ((XP_U16)(NG_COL_PASSWD+1))
|
||||
|
||||
struct NewGameCtx {
|
||||
NewGameEnableColProc enableColProc;
|
||||
NewGameEnableAttrProc enableAttrProc;
|
||||
|
@ -156,8 +158,6 @@ cpToGI( NGValue value, const void* cbClosure )
|
|||
case NG_COL_ROBOT:
|
||||
pl->isRobot = value.ng_bool;
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
|
||||
if ( !!strAddr ) {
|
||||
|
@ -259,8 +259,6 @@ deepCopy( NGValue value, const void* closure )
|
|||
case NG_COL_PASSWD:
|
||||
dvp->value.ng_cp = copyString( MPPARM(dvp->mpool) value.ng_cp );
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ typedef enum {
|
|||
NG_COL_NAME
|
||||
,NG_COL_ROBOT
|
||||
,NG_COL_PASSWD
|
||||
,NG_NUM_COLS
|
||||
} NewGameColumn;
|
||||
|
||||
typedef enum {
|
||||
|
@ -58,7 +57,6 @@ typedef enum {
|
|||
#endif
|
||||
NG_ATTR_NPLAYERS
|
||||
,NG_ATTR_NPLAYHEADER
|
||||
,NG_ATTR_CANJUGGLE
|
||||
} NewGameAttr;
|
||||
|
||||
typedef enum { NGEnableHidden,
|
||||
|
|
|
@ -278,7 +278,7 @@ handleConnOptionsButton( HWND hDlg, CEAppGlobals* globals,
|
|||
static XP_U16
|
||||
resIDForCol( XP_U16 player, NewGameColumn col )
|
||||
{
|
||||
XP_U16 resID;
|
||||
XP_U16 resID = 0;
|
||||
switch ( col ) {
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
case NG_COL_REMOTE:
|
||||
|
@ -294,16 +294,15 @@ resIDForCol( XP_U16 player, NewGameColumn col )
|
|||
case NG_COL_PASSWD:
|
||||
resID = PASS_EDIT1;
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT( 0 );
|
||||
}
|
||||
XP_ASSERT( resID != 0 );
|
||||
return resID + ( player * NUM_COLS );
|
||||
} /* resIDForCol */
|
||||
|
||||
static XP_U16
|
||||
resIDForAttr( NewGameAttr attr )
|
||||
{
|
||||
XP_U16 resID;
|
||||
XP_U16 resID = 0;
|
||||
switch( attr ) {
|
||||
case NG_ATTR_NPLAYERS:
|
||||
resID = IDC_NPLAYERSCOMBO;
|
||||
|
@ -319,9 +318,8 @@ resIDForAttr( NewGameAttr attr )
|
|||
case NG_ATTR_NPLAYHEADER:
|
||||
resID = IDC_TOTAL_LABEL;
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
XP_ASSERT( resID != 0 );
|
||||
return resID;
|
||||
} /* resIDForAttr */
|
||||
|
||||
|
|
|
@ -510,6 +510,8 @@ figureBoardParms( CEAppGlobals* globals, XP_U16 nRows, CEBoardParms* bparms )
|
|||
rc.right = rc.left + FORCE_WIDTH;
|
||||
rc.bottom = rc.top + FORCE_HEIGHT;
|
||||
#else
|
||||
#if defined DEBUG
|
||||
|
||||
if ( g_dbWidth != 0 ) {
|
||||
rc.right = rc.left + g_dbWidth;
|
||||
}
|
||||
|
@ -517,6 +519,7 @@ figureBoardParms( CEAppGlobals* globals, XP_U16 nRows, CEBoardParms* bparms )
|
|||
rc.bottom = rc.top + g_dbHeight;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
scrnWidth = (XP_U16)(rc.right - rc.left);
|
||||
|
|
|
@ -28,7 +28,9 @@ stuffTextInField( HWND hDlg, StrBoxInit* init )
|
|||
XP_U16 len, crlen;
|
||||
XP_UCHAR* sbuf;
|
||||
wchar_t* wbuf;
|
||||
#ifdef MEM_DEBUG
|
||||
CEAppGlobals* globals = init->globals;
|
||||
#endif
|
||||
|
||||
sbuf = XP_MALLOC( globals->mpool, nBytes + 1 );
|
||||
stream_getBytes( init->stream, sbuf, nBytes );
|
||||
|
|
Loading…
Reference in a new issue