mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 21:48:57 -05:00
avoid an unnecessary hashmap access
This commit is contained in:
@@ -129,10 +129,14 @@ namespace openspace {
|
||||
|
||||
HashKey key = chunkIndex.hashKey();
|
||||
|
||||
if (_tileCache->exist(key) && _tileCache->get(key).status == Tile::Status::OK) {
|
||||
return { _tileCache->get(key), uvTransform };
|
||||
if (_tileCache->exist(key)) {
|
||||
auto tile = _tileCache->get(key);
|
||||
if (tile.status == Tile::Status::OK) {
|
||||
return{ _tileCache->get(key), uvTransform };
|
||||
}
|
||||
|
||||
}
|
||||
else if (chunkIndex.level < 1) {
|
||||
if (chunkIndex.level < 1) {
|
||||
return{ Tile::TileUnavailable, uvTransform };
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user