From 2261914a6b291bf4073cddf30a862df3c3a341e9 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 31 Dec 2023 14:50:46 -0500 Subject: distancepos constant --- libalee/dictionary.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libalee/dictionary.cpp') diff --git a/libalee/dictionary.cpp b/libalee/dictionary.cpp index b1cbc5f..0abc038 100644 --- a/libalee/dictionary.cpp +++ b/libalee/dictionary.cpp @@ -91,14 +91,14 @@ Addr Dictionary::find(Word word) noexcept const Addr len = l & 0x1F; Word lw; - if ((l >> 6) < MaxDistance) { + if ((l >> Dictionary::DistancePos) < MaxDistance) { lw = Word::fromLength(lt + sizeof(Cell), len); if (equal(word, lw)) return lt; else if (lt == Begin) break; else - lt -= l >> 6; + lt -= l >> Dictionary::DistancePos; } else { lw = Word::fromLength(lt + 2 * sizeof(Cell), len); if (equal(word, lw)) @@ -120,7 +120,7 @@ Addr Dictionary::getexec(Addr addr) noexcept const Addr len = l & 0x1Fu; addr += sizeof(Cell); - if ((l >> 6) == MaxDistance) + if ((l >> Dictionary::DistancePos) == MaxDistance) addr += sizeof(Cell); addr += len; -- cgit v1.2.3