diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-26 16:55:17 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-26 16:55:17 -0400 |
commit | 5f1eb9a12821e7462b7b2853e0d95c8c863bf900 (patch) | |
tree | 6aa091a95846923e253a83886c5da2a8a62d5e93 /lib/z2.h | |
parent | 1160baa61bad605cf8a1d583e8ae356a54a942df (diff) | |
download | c++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.tar.gz c++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.tar.bz2 c++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.zip |
now using const passing of object reference instead of pointers
Diffstat (limited to 'lib/z2.h')
-rw-r--r-- | lib/z2.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -25,7 +25,7 @@ class z2_t { z2_t(bool x) : x(x) {} - ising_t act(const ising_t& s) { + ising_t act(const ising_t& s) const { if (x) { return ising_t(!s.x); } else { @@ -33,7 +33,7 @@ class z2_t { } } - z2_t act(const z2_t& r) { + z2_t act(const z2_t& r) const { if (x) { return z2_t(!r.x); } else { @@ -41,11 +41,11 @@ class z2_t { } } - ising_t act_inverse(const ising_t& s) { + ising_t act_inverse(const ising_t& s) const { return this->act(s); } - z2_t act_inverse(const z2_t& r) { + z2_t act_inverse(const z2_t& r) const { return this->act(r); } }; |