mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
fix compiler warnings: catch(out_of_range&)
This commit is contained in:
parent
b8dbaadff6
commit
d3662a935d
@ -245,7 +245,7 @@ void drawArrowTraps() {
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5010,7 +5010,7 @@ void drawFlashes() {
|
||||
flashdata& f = flashes[k];
|
||||
transmatrix V;
|
||||
|
||||
if(f.spd) try { V = gmatrix.at(f.where); } catch(out_of_range) {
|
||||
if(f.spd) try { V = gmatrix.at(f.where); } catch(out_of_range&) {
|
||||
f = flashes[size(flashes)-1];
|
||||
flashes.pop_back(); k--;
|
||||
continue;
|
||||
|
2
rug.cpp
2
rug.cpp
@ -584,7 +584,7 @@ void buildRug() {
|
||||
else if(v > w && v > w2)
|
||||
addTriangle(v, w, w2);
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
}
|
||||
|
||||
Xprintf("vertices = %d triangles= %d\n", size(points), size(triangles));
|
||||
|
@ -1410,7 +1410,7 @@ void doTraps() {
|
||||
bullet->parenttype = moArrowTrap;
|
||||
additional.push_back(bullet);
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
}
|
||||
else if(d == 3) {
|
||||
auto tl = traplimits(t.second);
|
||||
|
10
textures.cpp
10
textures.cpp
@ -385,7 +385,7 @@ bool texture_config::apply(cell *c, const transmatrix &V, int col) {
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(out_of_range) {
|
||||
catch(out_of_range&) {
|
||||
// printf("Ignoring tile #%d / %08x: not mapped\n", si.id, goldbergcode(c, si));
|
||||
return false;
|
||||
}
|
||||
@ -1371,7 +1371,7 @@ void actDrawPixel(cell *c, hyperpoint h, int col) {
|
||||
fillcircle(M2 * spin(2 * M_PI * i / c->type) * Mirror * h, col);
|
||||
}
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
}
|
||||
|
||||
void drawPixel(cell *c, hyperpoint h, int col) {
|
||||
@ -1396,10 +1396,10 @@ void drawPixel(hyperpoint h, int col) {
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
drawPixel(where, h, col);
|
||||
}
|
||||
catch(out_of_range) {}
|
||||
catch(out_of_range&) {}
|
||||
}
|
||||
|
||||
void drawLine(hyperpoint h1, hyperpoint h2, int col, int steps) {
|
||||
@ -1452,7 +1452,7 @@ void texture_config::remap(eTextureState old_tstate, eTextureState old_tstate_ma
|
||||
mi2.tvertices = move(new_tvertices);
|
||||
// printf("%08x remapping %d vertices to %d vertices\n", si.id, size(mi.tvertices), size(mi2.tvertices));
|
||||
}
|
||||
catch(out_of_range) {
|
||||
catch(out_of_range&) {
|
||||
printf("Unexpected missing cell #%d/%d", si.id, oldid);
|
||||
addMessage(XLAT("Unexpected missing cell #%d/%d", its(si.id), its(oldid)));
|
||||
config.tstate_max = config.tstate = tsAdjusting;
|
||||
|
Loading…
Reference in New Issue
Block a user