diff --git a/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h b/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h index 241aadd37..d9aa5d4b0 100644 --- a/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h +++ b/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h @@ -10,7 +10,6 @@ namespace sourcemeta::jsontoolkit { -// TODO: Merge as part of JSONObject /// @ingroup json template class FlatMap { public: @@ -53,8 +52,6 @@ template class FlatMap { return this->hasher(key); } - // TODO: Add an assign overload for const key, rvalue - auto assign(key_type &&key, mapped_type &&value) -> hash_type { const auto key_hash{this->hash(key)}; diff --git a/src/json/json_value.cc b/src/json/json_value.cc index f8a2998cd..68bee18ab 100644 --- a/src/json/json_value.cc +++ b/src/json/json_value.cc @@ -587,7 +587,8 @@ JSON::at(const String &key, } else if (this->is_boolean()) { return sizeof(bool); } else { - return sizeof(std::nullptr_t); + // The size of the union + return 8; } } diff --git a/test/json/json_null_test.cc b/test/json/json_null_test.cc index b53ee70d1..c4ba2643b 100644 --- a/test/json/json_null_test.cc +++ b/test/json/json_null_test.cc @@ -21,8 +21,6 @@ TEST(JSON_null, literal_equality) { TEST(JSON_null, estimated_byte_size) { const sourcemeta::jsontoolkit::JSON document{nullptr}; - // TODO: Use a different internal type for representing nulls, - // as this is otherwise 64 bytes? EXPECT_EQ(document.estimated_byte_size(), 8); }