diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5541a357..8d2140c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,10 @@ jobs: cc: clang cxx: clang++ type: shared + - os: macos-latest + cc: gcc-13 + cxx: g++-13 + type: static - os: ubuntu-latest cc: clang cxx: clang++ diff --git a/Brewfile b/Brewfile index a42e1111..bfe8ba28 100644 --- a/Brewfile +++ b/Brewfile @@ -1,2 +1,3 @@ brew "cmake" brew "sassc" +brew "gcc@13" diff --git a/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h b/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h index 8d01b6a9..f03372ef 100644 --- a/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h +++ b/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h @@ -209,9 +209,9 @@ class Decoder : private BasicDecoder { if (is_shared) { const std::uint64_t position{this->position()}; const std::uint64_t current{this->rewind(this->get_varint(), position)}; - sourcemeta::jsontoolkit::JSON string{this->get_string_utf8(length)}; + const sourcemeta::jsontoolkit::JSON value{this->get_string_utf8(length)}; this->seek(current); - return string; + return value; } else { return UTF8_STRING_NO_LENGTH({length}); } @@ -229,9 +229,10 @@ class Decoder : private BasicDecoder { if (is_shared) { const std::uint64_t position{this->position()}; const std::uint64_t current{this->rewind(this->get_varint(), position)}; - sourcemeta::jsontoolkit::JSON string = UTF8_STRING_NO_LENGTH({length}); + const sourcemeta::jsontoolkit::JSON value{ + UTF8_STRING_NO_LENGTH({length})}; this->seek(current); - return string; + return value; } else { return UTF8_STRING_NO_LENGTH({length}); } @@ -251,9 +252,10 @@ class Decoder : private BasicDecoder { if (is_shared) { const std::uint64_t position{this->position()}; const std::uint64_t current{this->rewind(this->get_varint(), position)}; - sourcemeta::jsontoolkit::JSON string = UTF8_STRING_NO_LENGTH({length}); + const sourcemeta::jsontoolkit::JSON value{ + UTF8_STRING_NO_LENGTH({length})}; this->seek(current); - return string; + return value; } else { return UTF8_STRING_NO_LENGTH({length}); } @@ -289,10 +291,10 @@ class Decoder : private BasicDecoder { if (prefix == 0) { const std::uint64_t position{this->position()}; const std::uint64_t current{this->rewind(this->get_varint(), position)}; - sourcemeta::jsontoolkit::JSON string = - PREFIX_VARINT_LENGTH_STRING_SHARED(options); + const sourcemeta::jsontoolkit::JSON value{ + PREFIX_VARINT_LENGTH_STRING_SHARED(options)}; this->seek(current); - return string; + return value; } else { return sourcemeta::jsontoolkit::JSON{this->get_string_utf8(prefix - 1)}; } @@ -438,9 +440,10 @@ class Decoder : private BasicDecoder { const std::uint64_t position{this->position()}; const std::uint64_t current{ this->rewind(this->get_varint(), position)}; - sourcemeta::jsontoolkit::JSON string{this->get_string_utf8(length)}; + const sourcemeta::jsontoolkit::JSON value{ + this->get_string_utf8(length)}; this->seek(current); - return string; + return value; }; case TYPE_STRING: return subtype == 0 ? this->FLOOR_VARINT_PREFIX_UTF8_STRING_SHARED(