Skip to content

Commit

Permalink
fix: amaZon -> amazon (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire authored Apr 14, 2023
1 parent 06714ea commit 66b6e7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bool ascii_has_upper_case(char* input, size_t length) {
auto broadcast = [](uint8_t v) -> uint64_t { return 0x101010101010101 * v; };
uint64_t broadcast_80 = broadcast(0x80);
uint64_t broadcast_Ap = broadcast(128 - 'A');
uint64_t broadcast_Zp = broadcast(128 - 'Z');
uint64_t broadcast_Zp = broadcast(128 - 'Z' - 1);
size_t i = 0;

uint64_t runner{0};
Expand All @@ -58,7 +58,7 @@ void ascii_map(char* input, size_t length) {
auto broadcast = [](uint8_t v) -> uint64_t { return 0x101010101010101 * v; };
uint64_t broadcast_80 = broadcast(0x80);
uint64_t broadcast_Ap = broadcast(128 - 'A');
uint64_t broadcast_Zp = broadcast(128 - 'Z');
uint64_t broadcast_Zp = broadcast(128 - 'Z' - 1);
size_t i = 0;

for (; i + 7 < length; i += 8) {
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/to_ascii_alternating.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
AMAZON
amazon
aa--
aa--
a†--
Expand Down

0 comments on commit 66b6e7c

Please sign in to comment.