Skip to content

Commit

Permalink
Fix compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Jan 30, 2024
1 parent f2728ba commit 9a3ab85
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 6 additions & 2 deletions test/src/unit-tile-metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,9 @@ struct CPPTileMetadataStringDimFx {
// Validate mins.
auto& min = frag_meta[0]->get_min("a");
CHECK(min.size() == sizeof(double));
CHECK(*static_cast<double*>(static_cast<void*>(min.data())) == 4);
CHECK(
*static_cast<const double*>(static_cast<const void*>(min.data())) ==
4);

CHECK_THROWS_WITH(
frag_meta[0]->get_min("d1"),
Expand All @@ -1569,7 +1571,9 @@ struct CPPTileMetadataStringDimFx {
// Validate maxs.
auto& max = frag_meta[0]->get_max("a");
CHECK(max.size() == sizeof(double));
CHECK(*static_cast<double*>(static_cast<void*>(max.data())) == 7);
CHECK(
*static_cast<const double*>(static_cast<const void*>(max.data())) ==
7);

CHECK_THROWS_WITH(
frag_meta[0]->get_max("d1"),
Expand Down
1 change: 1 addition & 0 deletions tiledb/sm/serialization/capnp_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#ifdef TILEDB_SERIALIZATION

#include <capnp/compat/std-iterator.h>
#include "tiledb-rest.capnp.h"

#include "tiledb/common/heap_memory.h"
Expand Down
8 changes: 3 additions & 5 deletions tiledb/sm/serialization/test/unit_capnp_nonempty_domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ TEST_CASE(
::capnp::MallocMessageBuilder message;
tiledb::sm::serialization::capnp::NonEmptyDomainList::Builder builder =
message.initRoot<tiledb::sm::serialization::capnp::NonEmptyDomainList>();
st = tiledb::sm::serialization::utils::serialize_non_empty_domain_rv(
tiledb::sm::serialization::utils::serialize_non_empty_domain_rv(
builder, nd_list, 1);
REQUIRE(st.ok());

auto&& [status, clone] =
auto clone =
tiledb::sm::serialization::utils::deserialize_non_empty_domain_rv(
builder);

REQUIRE(status.ok());
REQUIRE(clone.value()[0].var_size() == false);
REQUIRE(clone[0].var_size() == false);
}

0 comments on commit 9a3ab85

Please sign in to comment.