diff options
Diffstat (limited to 'lib/symmetric.h')
-rw-r--r-- | lib/symmetric.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/symmetric.h b/lib/symmetric.h index 0b292a6..a73b403 100644 --- a/lib/symmetric.h +++ b/lib/symmetric.h @@ -6,6 +6,7 @@ #include "types.h" #ifdef __cplusplus +#include "potts.h" extern "C" { #endif @@ -39,11 +40,11 @@ void init(symmetric_t<q> *p) { template <q_t q> void free_spin(symmetric_t<q> p) { - free(p->perm); + free(p.perm); } template <q_t q> -symmetric_t<q_t> copy(symmetric_t<q_t> x) { +symmetric_t<q> copy(symmetric_t<q> x) { symmetric_t<q> x2; x2.perm = (q_t *)malloc(q * sizeof(q_t)); |