Skip to content

Commit

Permalink
fix(scheme): compilation on apple clang
Browse files Browse the repository at this point in the history
Why can't we have nice things (~_~メ)
  • Loading branch information
Curve committed Aug 28, 2024
1 parent e3cafd9 commit 6db8353
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ extern "C"
*headers = static_cast<char **>(saucer_memory_alloc(*count * sizeof(char *)));
*values = static_cast<char **>(saucer_memory_alloc(*count * sizeof(char *)));

for (const auto &[index, element] : std::views::enumerate(data))
for (auto it = data.begin(); it != data.end(); it++)
{
const auto &[header, value] = element;
const auto &[header, value] = *it;
const auto index = std::distance(data.begin(), it);

(*headers)[index] = static_cast<char *>(saucer_memory_alloc(header.capacity()));
(*values)[index] = static_cast<char *>(saucer_memory_alloc(value.capacity()));
Expand Down

0 comments on commit 6db8353

Please sign in to comment.