Commit 25818a57 authored by Nathan/Eilisha Shiraini's avatar Nathan/Eilisha Shiraini
Browse files

Corrected mode shifting

parent 4d5868ed
......@@ -113,7 +113,7 @@ EncodingPath* EncodingPath::shiftAndAppend(Mode mode, const FixLenInteger& word)
}
#endif // EXCEPTIONS
std::list<FixLenInteger> words {it->second, word};
EncodingPath* newleaf = new EncodingPath(mode, this, words);
EncodingPath* newleaf = new EncodingPath(this->currentMode, this, words);
this->children.push_back(newleaf);
return newleaf;
}
......@@ -165,7 +165,7 @@ EncodingPath* EncodingPath::shiftAndAppendPair(uint8_t paircode) {
throw std::invalid_argument("Requested mode shift impossible");
}
#endif // EXCEPTIONS
EncodingPath* newleaf = new EncodingPath(Mode::PUNCT, this, std::list<FixLenInteger> { it->second, FixLenInteger(5, paircode) });
EncodingPath* newleaf = new EncodingPath(this->currentMode, this, std::list<FixLenInteger> { it->second, FixLenInteger(5, paircode) });
this->children.push_back(newleaf);
return newleaf;
}
......
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