diff --git a/src/workerd/api/data-url.c++ b/src/workerd/api/data-url.c++ index 61808802b0a..42d55b9509a 100644 --- a/src/workerd/api/data-url.c++ +++ b/src/workerd/api/data-url.c++ @@ -1,6 +1,7 @@ #include "data-url.h" #include +#include #include @@ -39,7 +40,7 @@ kj::Maybe DataUrl::from(const jsg::Url& url) { static const auto strip = [](auto label) { auto result = kj::heapArray(label.size()); size_t len = 0; - for (auto c: label) { + for (const char c: label) { if (!isAsciiWhitespace(c)) { result[len++] = c; } diff --git a/src/workerd/api/encoding.c++ b/src/workerd/api/encoding.c++ index 7186ad837a1..2ef849c7abb 100644 --- a/src/workerd/api/encoding.c++ +++ b/src/workerd/api/encoding.c++ @@ -7,6 +7,7 @@ #include "util.h" #include +#include #include #include diff --git a/src/workerd/api/encoding.h b/src/workerd/api/encoding.h index 420ec1c7b53..1dc24be2257 100644 --- a/src/workerd/api/encoding.h +++ b/src/workerd/api/encoding.h @@ -11,18 +11,6 @@ namespace workerd::api { -constexpr kj::FixedArray ascii_whitespace_table = []() consteval { - kj::FixedArray result{}; - for (uint8_t c: {0x09, 0x0a, 0x0c, 0x0d, 0x20}) { - result[c] = true; - } - return result; -}(); - -constexpr bool isAsciiWhitespace(uint8_t c) noexcept { - return ascii_whitespace_table[c]; -} - // The encodings listed here are defined as required by the Encoding spec. // The first label is enum we use to identify the encoding in code, while // the second label is the public identifier. diff --git a/src/workerd/api/pyodide/pyodide.c++ b/src/workerd/api/pyodide/pyodide.c++ index 9c8a5884aab..b09b1b2aecc 100644 --- a/src/workerd/api/pyodide/pyodide.c++ +++ b/src/workerd/api/pyodide/pyodide.c++ @@ -4,6 +4,7 @@ #include "pyodide.h" #include +#include #include #include @@ -190,13 +191,13 @@ kj::Array ArtifactBundler::parsePythonScriptImports(kj::Array