1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-20 12:20:01 +00:00

older compilers

This commit is contained in:
Zeno Rogue 2019-12-27 13:11:31 +01:00
parent e44c8ee53b
commit ec6ffded34
4 changed files with 10 additions and 3 deletions

View File

@ -141,8 +141,8 @@ void load(const string& fname) {
int bi = ep.iparse(); verify_index(bi, c.shapes); ep.force_eat(",");
int bs = ep.iparse(); verify_index(bs, c.shapes[bi]); ep.force_eat(",");
int m = ep.iparse(); ep.force_eat(")");
c.shapes[ai].connections[as] = {bi, bs, m};
c.shapes[bi].connections[bs] = {ai, as, m};
c.shapes[ai].connections[as] = make_tuple(bi, bs, m);
c.shapes[bi].connections[bs] = make_tuple(ai, as, m);
}
else throw hr_parse_exception("expecting command");
}

View File

@ -1656,7 +1656,7 @@ void celldrawer::check_rotations() {
// so we use function(old) which will return the same value as function(c) if ds.best is not known yet
cell *old = ds.best ? ds.best : c;
auto use_if_less = [this] (int a, int b, ld spd, int side) {
auto use_if_less = [this, &ds] (int a, int b, ld spd, int side) {
if(a > b) return;
if(!ds.best || a < b) ds.reset();
if(a <= b) {

View File

@ -43,6 +43,12 @@ EX namespace nisot {
EX }
#if !CAP_SOLV
EX namespace sn {
EX always_false in() { return always_false(); }
EX }
#endif
#if CAP_SOLV
EX namespace sn {

View File

@ -124,6 +124,7 @@ EX bool appears(const string& haystack, const string& needle) {
struct hr_parse_exception : hr_exception {
string s;
hr_parse_exception(const string& z) : s(z) {}
~hr_parse_exception() noexcept(true) {}
};
struct exp_parser {