Skip to content

Commit

Permalink
Use correct types in assert
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan <[email protected]>
  • Loading branch information
Ryanf55 authored May 10, 2024
1 parent 9d02aba commit 79e670f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geospatial/src/Dem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ int Dem::LoadData()
std::vector<float> buffer;
// Convert to uint64_t for multiplication to avoid overflow.
// https://github.com/OSGeo/gdal/issues/9713
static_assert(std::numeric_limits<uint64_t>::max() >= std::numeric_limits<uint32_t>::max() * std::numeric_limits<uint32_t>::max());
static_assert(std::numeric_limits<uint64_t>::max() >= std::numeric_limits<int>::max() * std::numeric_limits<int>::max());
buffer.resize(static_cast<uint64_t>(destWidth) * static_cast<uint64_t>(destHeight));
//! @todo Do not assume users only want to load from the origin of the dataset.
// Instead, add a configuration to change where in the dataset to read from.
Expand Down

0 comments on commit 79e670f

Please sign in to comment.