Some miscellaneous refactoring and copy-editing

This commit is contained in:
Rangi42
2025-02-10 16:51:51 +01:00
parent 177a3abfac
commit 48412e9c56
6 changed files with 17 additions and 24 deletions

View File

@@ -163,11 +163,11 @@ void charmap_Add(std::string const &mapping, std::vector<int32_t> &&value) {
std::swap(node.value, value);
}
bool charmap_HasChar(std::string const &input) {
bool charmap_HasChar(std::string const &mapping) {
Charmap const &charmap = *currentCharmap;
size_t nodeIdx = 0;
for (char c : input) {
for (char c : mapping) {
nodeIdx = charmap.nodes[nodeIdx].next[static_cast<uint8_t>(c)];
if (!nodeIdx) {