1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-21 08:57:39 +00:00

as_poly() to eliminate dynamic_cast<dqi_poly*>

This commit is contained in:
Zeno Rogue
2024-10-05 13:11:23 +02:00
parent 324b670c29
commit 2d8397d289
5 changed files with 10 additions and 8 deletions

View File

@@ -502,7 +502,7 @@ EX always_false in;
EX void render() {
#if MAXMDIM >= 4
for(auto& p: ptds) {
auto p2 = dynamic_cast<dqi_poly*>(&*p);
auto p2 = p->as_poly();
if(p2)
prepare(*p2);
}
@@ -524,7 +524,7 @@ EX always_false in;
#endif
for(auto& p: ptds) {
auto p2 = dynamic_cast<dqi_poly*>(&*p);
auto p2 = p->as_poly();
if(p2)
polygon(*p2);
}