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

Major bugfix

parent b4b14e21
#pragma once #pragma once
#define LIFELIB_VERSION "ll1.21" #define LIFELIB_VERSION "ll1.22"
#include "bitbounds.h" #include "bitbounds.h"
#include <stdint.h> #include <stdint.h>
......
...@@ -231,33 +231,34 @@ namespace apg { ...@@ -231,33 +231,34 @@ namespace apg {
// Set operations (mutable): // Set operations (mutable):
pattern& operator&=(const pattern &other) { void changehnode(hypernode<uint32_t> hn) {
hnode = lab->boolean_universe(hnode, coerce(other), 0); hnode = hn;
lab->sethandle(ihandle, hnode); 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; return *this;
} }
pattern& operator|=(const pattern &other) { pattern& operator|=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 1); changehnode(lab->boolean_universe(hnode, coerce(other), 1));
lab->sethandle(ihandle, hnode);
return *this; return *this;
} }
pattern& operator^=(const pattern &other) { pattern& operator^=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 2); changehnode(lab->boolean_universe(hnode, coerce(other), 2));
lab->sethandle(ihandle, hnode);
return *this; return *this;
} }
pattern& operator-=(const pattern &other) { pattern& operator-=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 3); changehnode(lab->boolean_universe(hnode, coerce(other), 3));
lab->sethandle(ihandle, hnode);
return *this; return *this;
} }
pattern& operator+=(const pattern &other) { pattern& operator+=(const pattern &other) {
hnode = lab->boolean_universe(hnode, coerce(other), 1); changehnode(lab->boolean_universe(hnode, coerce(other), 1));
lab->sethandle(ihandle, hnode);
return *this; 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