mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
eliminate picky compiler warnings
This commit is contained in:
parent
2612946923
commit
6352a84e68
6 changed files with 24 additions and 22 deletions
|
@ -42,9 +42,9 @@ class CXWBlankSelDlg : public CEikDialog
|
|||
TBool OkToExitL( TInt aKeyCode );
|
||||
|
||||
private:
|
||||
CDesC16ArrayFlat* iFacesList;
|
||||
const XP_UCHAR4* iTexts;
|
||||
TInt* iResultP;
|
||||
TInt iNTiles;
|
||||
TInt* iResultP;
|
||||
CDesC16ArrayFlat* iFacesList;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
#include "xwords.rsg"
|
||||
|
||||
CXWAskDlg::CXWAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream ) :
|
||||
iStream(aStream), iKillStream(aKillStream), iMessage(NULL)
|
||||
iStream(aStream), iMessage(NULL), iKillStream(aKillStream)
|
||||
{
|
||||
MPASSIGN( this->mpool, mpool );
|
||||
}
|
||||
|
||||
CXWAskDlg::CXWAskDlg( MPFORMAL TBuf16<128>* aMessage)
|
||||
: iMessage(aMessage), iStream(NULL)
|
||||
: iStream(NULL), iMessage(aMessage)
|
||||
{
|
||||
MPASSIGN( this->mpool, mpool );
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ symCountSpecials( SymDictCtxt* ctxt )
|
|||
} /* symCountSpecials */
|
||||
|
||||
static XP_Bitmap*
|
||||
symMakeBitmap( SymDictCtxt* ctxt, RFile* file )
|
||||
symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file )
|
||||
{
|
||||
XP_U8 nCols = readXP_U8( file );
|
||||
// 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;
|
||||
|
||||
for ( TInt i = 0; i < numFaces; ++i ) {
|
||||
TInt i;
|
||||
for ( i = 0; i < numFaces; ++i ) {
|
||||
ctxt->super.faces16[i] = readXP_U16( &file );
|
||||
}
|
||||
#else
|
||||
|
@ -281,7 +281,7 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName )
|
|||
file.Seek( ESeekCurrent, pos );
|
||||
dawgSize -= pos;
|
||||
|
||||
if ( dawgSize > sizeof(XP_U32) ) {
|
||||
if ( dawgSize > SC(TInt, sizeof(XP_U32)) ) {
|
||||
XP_U32 offset = readXP_U32( &file );
|
||||
dawgSize -= sizeof(XP_U32);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
|||
const CListBoxView::CSelectionIndexArray* indices;
|
||||
box = static_cast<CEikTextListBox*>(Control(ESelGameChoice));
|
||||
TInt index = box->CurrentItemIndex();
|
||||
TDesC16* selName = &(*iGameMgr->GetNames())[index];
|
||||
TDesC16 selName = (*iGameMgr->GetNames())[index];
|
||||
|
||||
XP_LOGF( "CXSavedGamesDlg::OkToExitL(%d) called", aKeyCode );
|
||||
|
||||
|
@ -73,11 +73,11 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
|||
break;
|
||||
|
||||
case XW_SGAMES_RENAME_COMMAND:
|
||||
if ( 0 == selName->Compare(*iCurName) ) {
|
||||
if ( 0 == selName.Compare(*iCurName) ) {
|
||||
iOwner->UserErrorFromID( R_ALERT_NO_RENAME_OPEN_GAME );
|
||||
} else {
|
||||
TGameName newName;
|
||||
if ( EditSelName( static_cast<TGameName*>(selName), &newName ) ) {
|
||||
if ( EditSelName( static_cast<TGameName*>(&selName), &newName ) ) {
|
||||
ResetNames( -1, &newName );
|
||||
box->DrawDeferred();
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
|||
|
||||
case XW_SGAMES_DELETE_COMMAND: {
|
||||
XP_LOGF( "delete" );
|
||||
if ( 0 == selName->Compare(*iCurName) ) {
|
||||
if ( 0 == selName.Compare(*iCurName) ) {
|
||||
iOwner->UserErrorFromID( R_ALERT_NO_DELETE_OPEN_GAME );
|
||||
} else if ( iOwner->UserQuery( (UtilQueryID)SYM_QUERY_CONFIRM_DELGAME,
|
||||
NULL ) ) {
|
||||
|
|
|
@ -166,7 +166,7 @@ CXWGamesMgr::StoreGameL( const TGameName* aName, /* does not have extension */
|
|||
|
||||
TInt siz = stream_getSize( aStream );
|
||||
TUint8* buf = new (ELeave) TUint8[siz];
|
||||
stream_getBytes( aStream, buf, siz );
|
||||
stream_getBytes( aStream, buf, SC(XP_U16, siz) );
|
||||
TPtrC8 tbuf( buf, siz );
|
||||
err = file.Write( tbuf, siz );
|
||||
XP_ASSERT( err == KErrNone );
|
||||
|
@ -195,7 +195,7 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream )
|
|||
|
||||
for ( ; ; ) {
|
||||
TBuf8<256> buf;
|
||||
TInt err = file.Read( buf, buf.MaxLength() );
|
||||
file.Read( buf, buf.MaxLength() );
|
||||
TInt nRead = buf.Size();
|
||||
if ( nRead <= 0 ) {
|
||||
break;
|
||||
|
@ -209,7 +209,8 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream )
|
|||
TBool
|
||||
CXWGamesMgr::DeleteSelected( TInt aIndex )
|
||||
{
|
||||
return DeleteFileFor( &(*iNamesList)[aIndex] );
|
||||
TPtrC16 aName = (*iNamesList)[aIndex];
|
||||
return DeleteFileFor( &aName );
|
||||
} /* DeleteSelected */
|
||||
|
||||
TBool
|
||||
|
|
|
@ -543,18 +543,19 @@ CXWordsAppView::DeleteGame()
|
|||
void
|
||||
CXWordsAppView::PositionBoard()
|
||||
{
|
||||
TRect rect = Rect();
|
||||
TInt boardWidth = 15 * scaleBoardH;
|
||||
const TInt scoreTop = 25;
|
||||
const TInt scoreHt = 120;
|
||||
const TRect rect = Rect();
|
||||
const XP_U16 boardWidth = 15 * scaleBoardH;
|
||||
const XP_U16 scoreTop = 25;
|
||||
const XP_U16 scoreHt = 120;
|
||||
|
||||
board_setPos( iGame.board, 2, 2, XP_FALSE );
|
||||
board_setScale( iGame.board, scaleBoardH, scaleBoardV );
|
||||
|
||||
TInt scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */
|
||||
TInt scoreRight = rect.iBr.iX - 2 - 1; /* 2 for border */
|
||||
XP_U16 scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */
|
||||
XP_U16 scoreRight = SC(XP_U16, rect.iBr.iX - 2 - 1); /* 2 for border */
|
||||
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_setTrayLoc( iGame.board,
|
||||
|
|
Loading…
Reference in a new issue