1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-17 02:40:03 +00:00

product:: in_underlying functions now simply call f when not in product

This commit is contained in:
Zeno Rogue 2019-08-19 13:58:19 +02:00
parent ce36413968
commit d91adc45a5

View File

@ -719,11 +719,13 @@ EX namespace product {
}
EX void in_underlying_map(const reaction_t& f) {
((hrmap_product*)currentmap)->in_underlying(f);
if(!prod) f();
else ((hrmap_product*)currentmap)->in_underlying(f);
}
#if HDR
template<class T> auto in_underlying_geometry(const T& f) {
if(!prod) return f();
dynamicval<eGeometry> g(geometry, underlying);
dynamicval<geometry_information*> gc(cgip, underlying_cgip);
return f();