FIX: Range get stoped use exception as termination case sentinel

This commit is contained in:
Christos Choutouridis 2020-10-24 22:23:40 +03:00
parent 524988079f
commit 79bb675c94

View File

@ -172,13 +172,10 @@ class Range {
* @return The first item of the range or Const.noTileId if there is none.
*/
int get () {
try {
if (!numbers.isEmpty())
return numbers.remove(0);
}
catch (IndexOutOfBoundsException e) {
return Const.noTileId;
}
}
/** @name protected data types */
/** @{ */