aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-04 19:30:56 +0200
committerDavid Robillard <d@drobilla.net>2018-08-07 20:01:11 +0200
commitc08a9f3cc4bca0558814ba9f0376051b3dc78306 (patch)
tree02027c367da9fcee875bc5081c733fbc19b8ae68
parentdaa750c18da7a18bdccc357cbde993a8441716d9 (diff)
downloadchilbert-c08a9f3cc4bca0558814ba9f0376051b3dc78306.tar.gz
chilbert-c08a9f3cc4bca0558814ba9f0376051b3dc78306.tar.bz2
chilbert-c08a9f3cc4bca0558814ba9f0376051b3dc78306.zip
Use toggle instead of manually accessing racks
-rw-r--r--Hilbert/Algorithm.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Hilbert/Algorithm.hpp b/Hilbert/Algorithm.hpp
index bcc3b55..b22fc5e 100644
--- a/Hilbert/Algorithm.hpp
+++ b/Hilbert/Algorithm.hpp
@@ -162,10 +162,6 @@ namespace Hilbert
l.reset();
h.reset();
- int r, b;
- BBV_MODSPLIT(r,b,n-1);
- FBV_UINT bm = (1<<b);
-
// Work from MSB to LSB
for ( i = m-1; i >= 0; i-- )
{
@@ -182,7 +178,7 @@ namespace Hilbert
w = t;
if ( i < m-1 )
- w.racks()[r] ^= bm;
+ w.toggle(n - 1);
// Concatenate to the index.
ho -= n;