Skip to content

Commit

Permalink
Time to stop being dumb.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed Nov 14, 2023
1 parent f971b42 commit 0538300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/zarr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,19 +381,19 @@ zarr::Zarr::get_meta(StoragePropertyMetadata* meta) const
.width = {
.writable = 1,
.low = 32.f,
.high = (float)std::numeric_limits<uint32_t>::max(),
.high = (float)std::numeric_limits<uint16_t>::max(),
.type = PropertyType_FixedPrecision
},
.height = {
.writable = 1,
.low = 32.f,
.high = (float)std::numeric_limits<uint32_t>::max(),
.high = (float)std::numeric_limits<uint16_t>::max(),
.type = PropertyType_FixedPrecision
},
.planes = {
.writable = 1,
.low = 32.f,
.high = (float)std::numeric_limits<uint32_t>::max(),
.high = (float)std::numeric_limits<uint16_t>::max(),
.type = PropertyType_FixedPrecision
},
},
Expand Down Expand Up @@ -577,8 +577,6 @@ zarr::Zarr::set_chunking(const ChunkingProps& props, const ChunkingMeta& meta)
props.height, (uint32_t)meta.height.low, (uint32_t)meta.height.high),
};

const auto hi = (uint32_t)(-1.f);

planes_per_chunk_ = std::clamp(
props.planes, (uint32_t)meta.planes.low, (uint32_t)meta.planes.high);

Expand Down
4 changes: 2 additions & 2 deletions src/zarr.v3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ zarr::ZarrV3::get_meta(StoragePropertyMetadata* meta) const
.is_supported = 1,
.width = { .writable = 1,
.low = 1.f,
.high = (float)std::numeric_limits<uint32_t>::max(),
.high = (float)std::numeric_limits<uint16_t>::max(),
.type = PropertyType_FixedPrecision },
.height = { .writable = 1,
.low = 1.f,
.high = (float)std::numeric_limits<uint32_t>::max(),
.high = (float)std::numeric_limits<uint16_t>::max(),
.type = PropertyType_FixedPrecision },
.planes = { .writable = 1,
.low = 1.f,
Expand Down

0 comments on commit 0538300

Please sign in to comment.