TileImageLayer: require both elements to be non-null
simplifies some algorithms
This commit is contained in:
parent
744e74267a
commit
a99a6f0f1c
3 changed files with 30 additions and 25 deletions
|
@ -308,19 +308,19 @@ public class MakeTiles
|
|||
static TileImage parseFrameSpec(String [] layerStrings)
|
||||
throws IOException
|
||||
{
|
||||
if (layerStrings.length == 1) {
|
||||
return parseLayerSpec(layerStrings[0]);
|
||||
}
|
||||
|
||||
TileImageLayer result = null;
|
||||
TileImage result = null;
|
||||
|
||||
for (String layerStr : layerStrings) {
|
||||
|
||||
TileImageLayer rv = new TileImageLayer(
|
||||
result,
|
||||
parseLayerSpec(layerStr)
|
||||
);
|
||||
result = rv;
|
||||
TileImage newLayer = parseLayerSpec(layerStr);
|
||||
if (result == null) {
|
||||
result = newLayer;
|
||||
}
|
||||
else {
|
||||
result = new TileImageLayer(
|
||||
result,
|
||||
newLayer);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Reference in a new issue