mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
optimization: return null quickly if param is invalid
This commit is contained in:
parent
6f4cb4b0ca
commit
f85bb082fc
1 changed files with 8 additions and 4 deletions
|
@ -420,10 +420,14 @@ public class GameListAdapter implements ExpandableListAdapter {
|
|||
|
||||
protected GameListItem getGameItemFor( long rowid )
|
||||
{
|
||||
long[] rowids = { rowid };
|
||||
GameListItem[] items = new GameListItem[1];
|
||||
getGameItemsFor( rowids, items );
|
||||
return items[0];
|
||||
GameListItem result = null;
|
||||
if ( DBUtils.ROWID_NOTFOUND != rowid ) {
|
||||
long[] rowids = { rowid };
|
||||
GameListItem[] items = new GameListItem[1];
|
||||
getGameItemsFor( rowids, items );
|
||||
result = items[0];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private GameListGroup getGroupItemFor( int groupPosition )
|
||||
|
|
Loading…
Reference in a new issue