eliminate picky compiler warnings

This commit is contained in:
ehouse 2005-01-23 18:02:39 +00:00
parent 2612946923
commit 6352a84e68
6 changed files with 24 additions and 22 deletions

View file

@ -42,9 +42,9 @@ class CXWBlankSelDlg : public CEikDialog
TBool OkToExitL( TInt aKeyCode ); TBool OkToExitL( TInt aKeyCode );
private: private:
CDesC16ArrayFlat* iFacesList;
const XP_UCHAR4* iTexts; const XP_UCHAR4* iTexts;
TInt* iResultP;
TInt iNTiles; TInt iNTiles;
TInt* iResultP;
CDesC16ArrayFlat* iFacesList;
}; };
#endif #endif

View file

@ -26,13 +26,13 @@
#include "xwords.rsg" #include "xwords.rsg"
CXWAskDlg::CXWAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream ) : CXWAskDlg::CXWAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream ) :
iStream(aStream), iKillStream(aKillStream), iMessage(NULL) iStream(aStream), iMessage(NULL), iKillStream(aKillStream)
{ {
MPASSIGN( this->mpool, mpool ); MPASSIGN( this->mpool, mpool );
} }
CXWAskDlg::CXWAskDlg( MPFORMAL TBuf16<128>* aMessage) CXWAskDlg::CXWAskDlg( MPFORMAL TBuf16<128>* aMessage)
: iMessage(aMessage), iStream(NULL) : iStream(NULL), iMessage(aMessage)
{ {
MPASSIGN( this->mpool, mpool ); MPASSIGN( this->mpool, mpool );
} }

View file

@ -79,7 +79,7 @@ symCountSpecials( SymDictCtxt* ctxt )
} /* symCountSpecials */ } /* symCountSpecials */
static XP_Bitmap* static XP_Bitmap*
symMakeBitmap( SymDictCtxt* ctxt, RFile* file ) symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file )
{ {
XP_U8 nCols = readXP_U8( file ); XP_U8 nCols = readXP_U8( file );
// CEBitmapInfo* bitmap = (CEBitmapInfo*)NULL; // CEBitmapInfo* bitmap = (CEBitmapInfo*)NULL;
@ -253,8 +253,8 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName )
} }
ctxt->super.is_4_byte = ctxt->super.nodeSize == 4; ctxt->super.is_4_byte = ctxt->super.nodeSize == 4;
TInt i;
for ( TInt i = 0; i < numFaces; ++i ) { for ( i = 0; i < numFaces; ++i ) {
ctxt->super.faces16[i] = readXP_U16( &file ); ctxt->super.faces16[i] = readXP_U16( &file );
} }
#else #else
@ -281,7 +281,7 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName )
file.Seek( ESeekCurrent, pos ); file.Seek( ESeekCurrent, pos );
dawgSize -= pos; dawgSize -= pos;
if ( dawgSize > sizeof(XP_U32) ) { if ( dawgSize > SC(TInt, sizeof(XP_U32)) ) {
XP_U32 offset = readXP_U32( &file ); XP_U32 offset = readXP_U32( &file );
dawgSize -= sizeof(XP_U32); dawgSize -= sizeof(XP_U32);

View file

@ -53,7 +53,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
const CListBoxView::CSelectionIndexArray* indices; const CListBoxView::CSelectionIndexArray* indices;
box = static_cast<CEikTextListBox*>(Control(ESelGameChoice)); box = static_cast<CEikTextListBox*>(Control(ESelGameChoice));
TInt index = box->CurrentItemIndex(); TInt index = box->CurrentItemIndex();
TDesC16* selName = &(*iGameMgr->GetNames())[index]; TDesC16 selName = (*iGameMgr->GetNames())[index];
XP_LOGF( "CXSavedGamesDlg::OkToExitL(%d) called", aKeyCode ); XP_LOGF( "CXSavedGamesDlg::OkToExitL(%d) called", aKeyCode );
@ -73,11 +73,11 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
break; break;
case XW_SGAMES_RENAME_COMMAND: case XW_SGAMES_RENAME_COMMAND:
if ( 0 == selName->Compare(*iCurName) ) { if ( 0 == selName.Compare(*iCurName) ) {
iOwner->UserErrorFromID( R_ALERT_NO_RENAME_OPEN_GAME ); iOwner->UserErrorFromID( R_ALERT_NO_RENAME_OPEN_GAME );
} else { } else {
TGameName newName; TGameName newName;
if ( EditSelName( static_cast<TGameName*>(selName), &newName ) ) { if ( EditSelName( static_cast<TGameName*>(&selName), &newName ) ) {
ResetNames( -1, &newName ); ResetNames( -1, &newName );
box->DrawDeferred(); box->DrawDeferred();
} }
@ -86,7 +86,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
case XW_SGAMES_DELETE_COMMAND: { case XW_SGAMES_DELETE_COMMAND: {
XP_LOGF( "delete" ); XP_LOGF( "delete" );
if ( 0 == selName->Compare(*iCurName) ) { if ( 0 == selName.Compare(*iCurName) ) {
iOwner->UserErrorFromID( R_ALERT_NO_DELETE_OPEN_GAME ); iOwner->UserErrorFromID( R_ALERT_NO_DELETE_OPEN_GAME );
} else if ( iOwner->UserQuery( (UtilQueryID)SYM_QUERY_CONFIRM_DELGAME, } else if ( iOwner->UserQuery( (UtilQueryID)SYM_QUERY_CONFIRM_DELGAME,
NULL ) ) { NULL ) ) {

View file

@ -166,7 +166,7 @@ CXWGamesMgr::StoreGameL( const TGameName* aName, /* does not have extension */
TInt siz = stream_getSize( aStream ); TInt siz = stream_getSize( aStream );
TUint8* buf = new (ELeave) TUint8[siz]; TUint8* buf = new (ELeave) TUint8[siz];
stream_getBytes( aStream, buf, siz ); stream_getBytes( aStream, buf, SC(XP_U16, siz) );
TPtrC8 tbuf( buf, siz ); TPtrC8 tbuf( buf, siz );
err = file.Write( tbuf, siz ); err = file.Write( tbuf, siz );
XP_ASSERT( err == KErrNone ); XP_ASSERT( err == KErrNone );
@ -195,7 +195,7 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream )
for ( ; ; ) { for ( ; ; ) {
TBuf8<256> buf; TBuf8<256> buf;
TInt err = file.Read( buf, buf.MaxLength() ); file.Read( buf, buf.MaxLength() );
TInt nRead = buf.Size(); TInt nRead = buf.Size();
if ( nRead <= 0 ) { if ( nRead <= 0 ) {
break; break;
@ -209,7 +209,8 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream )
TBool TBool
CXWGamesMgr::DeleteSelected( TInt aIndex ) CXWGamesMgr::DeleteSelected( TInt aIndex )
{ {
return DeleteFileFor( &(*iNamesList)[aIndex] ); TPtrC16 aName = (*iNamesList)[aIndex];
return DeleteFileFor( &aName );
} /* DeleteSelected */ } /* DeleteSelected */
TBool TBool

View file

@ -543,18 +543,19 @@ CXWordsAppView::DeleteGame()
void void
CXWordsAppView::PositionBoard() CXWordsAppView::PositionBoard()
{ {
TRect rect = Rect(); const TRect rect = Rect();
TInt boardWidth = 15 * scaleBoardH; const XP_U16 boardWidth = 15 * scaleBoardH;
const TInt scoreTop = 25; const XP_U16 scoreTop = 25;
const TInt scoreHt = 120; const XP_U16 scoreHt = 120;
board_setPos( iGame.board, 2, 2, XP_FALSE ); board_setPos( iGame.board, 2, 2, XP_FALSE );
board_setScale( iGame.board, scaleBoardH, scaleBoardV ); board_setScale( iGame.board, scaleBoardH, scaleBoardV );
TInt scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */ XP_U16 scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */
TInt scoreRight = rect.iBr.iX - 2 - 1; /* 2 for border */ XP_U16 scoreRight = SC(XP_U16, rect.iBr.iX - 2 - 1); /* 2 for border */
board_setScoreboardLoc( iGame.board, scoreLeft, scoreTop, board_setScoreboardLoc( iGame.board, scoreLeft, scoreTop,
scoreRight - scoreLeft - 1, scoreHt, XP_FALSE ); SC( XP_U16, scoreRight - scoreLeft - 1),
scoreHt, XP_FALSE );
board_setYOffset( iGame.board, 0 ); board_setYOffset( iGame.board, 0 );
board_setTrayLoc( iGame.board, board_setTrayLoc( iGame.board,