Commit 1dd6edde authored by Adam P. Goucher's avatar Adam P. Goucher

Major bugfix

parent b4b14e21
#pragma once
#define LIFELIB_VERSION "ll1.21"
#define LIFELIB_VERSION "ll1.22"
#include "bitbounds.h"
#include <stdint.h>
......
......@@ -231,33 +231,34 @@ namespace apg {
// Set operations (mutable):
pattern& operator&=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 0);
void changehnode(hypernode<uint32_t> hn) {
hnode = hn;
lab->sethandle(ihandle, hnode);
this->dt = 0; this->minp = 0; this->dx = 0; this->dy = 0;
}
pattern& operator&=(const pattern &other) {
changehnode(lab->boolean_universe(hnode, coerce(other), 0));
return *this;
}
pattern& operator|=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 1);
lab->sethandle(ihandle, hnode);
changehnode(lab->boolean_universe(hnode, coerce(other), 1));
return *this;
}
pattern& operator^=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 2);
lab->sethandle(ihandle, hnode);
changehnode(lab->boolean_universe(hnode, coerce(other), 2));
return *this;
}
pattern& operator-=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 3);
lab->sethandle(ihandle, hnode);
changehnode(lab->boolean_universe(hnode, coerce(other), 3));
return *this;
}
pattern& operator+=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 1);
lab->sethandle(ihandle, hnode);
changehnode(lab->boolean_universe(hnode, coerce(other), 1));
return *this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment