Skip to content

Commit

Permalink
🚨 Refactor geohash string encoding in zoom_in function
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Jan 15, 2024
1 parent f4e0dbb commit bd3f6ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyinterp/core/lib/geohash/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ static auto zoom_in(char *ptr, pybind11::ssize_t size, uint32_t from_precision,
for (auto ix = 0; ix < size; ++ix) {
auto codes =
int64::bounding_boxes(bounding_box(ptr, from_precision), bits);
for (auto jx = 0; jx < codes.size(); ++jx) {
Base32::encode(codes[jx], buffer, to_precision);
for (uint64_t code : codes) {
Base32::encode(code, buffer, to_precision);
buffer += to_precision;
}
ptr += from_precision;
Expand Down

0 comments on commit bd3f6ec

Please sign in to comment.