1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

operators in hyper.h are inline

This commit is contained in:
Zeno Rogue 2018-09-01 13:50:56 +02:00
parent c08a6bf79a
commit 8d806182d8

10
hyper.h
View File

@ -538,8 +538,8 @@ typedef walker<heptagon> heptspin;
typedef walker<cell> cellwalker; typedef walker<cell> cellwalker;
static const struct cth_t { cth_t() {}} cth; static const struct cth_t { cth_t() {}} cth;
heptspin operator+ (cellwalker cw, cth_t) { return heptspin(cw.at->master, cw.spin * DUALMUL, cw.mirrored); } inline heptspin operator+ (cellwalker cw, cth_t) { return heptspin(cw.at->master, cw.spin * DUALMUL, cw.mirrored); }
cellwalker operator+ (heptspin hs, cth_t) { return cellwalker(hs.at->c7, hs.spin / DUALMUL, hs.mirrored); } inline cellwalker operator+ (heptspin hs, cth_t) { return cellwalker(hs.at->c7, hs.spin / DUALMUL, hs.mirrored); }
#define BUGCOLORS 3 #define BUGCOLORS 3
@ -1862,9 +1862,9 @@ enum class PPR {
DEFAULT = -1 DEFAULT = -1
}; };
PPR operator + (PPR x, int y) { return PPR(int(x) + y); } inline PPR operator + (PPR x, int y) { return PPR(int(x) + y); }
PPR operator - (PPR x, int y) { return PPR(int(x) - y); } inline PPR operator - (PPR x, int y) { return PPR(int(x) - y); }
int operator - (PPR x, PPR y) { return int(x) - int(y); } inline int operator - (PPR x, PPR y) { return int(x) - int(y); }
namespace mapeditor { namespace mapeditor {
bool drawUserShape(const transmatrix& V, eShapegroup group, int id, int color, cell *c, PPR prio = PPR::DEFAULT); bool drawUserShape(const transmatrix& V, eShapegroup group, int id, int color, cell *c, PPR prio = PPR::DEFAULT);