summaryrefslogtreecommitdiff
path: root/test/utils/large_objects/large_object_utils.cpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-12-16 13:39:36 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2024-12-19 16:17:46 +0100
commite2b6d9d3c41d162517019ee0bf9147e398a5b1fa (patch)
tree248f0a50ec1183836a8257580779cac79ccf51f5 /test/utils/large_objects/large_object_utils.cpp
parent827f05a53cb831bd54166ee812752ae3cce2b69b (diff)
downloadjustbuild-e2b6d9d3c41d162517019ee0bf9147e398a5b1fa.tar.gz
Fix cause of minor warnings
Diffstat (limited to 'test/utils/large_objects/large_object_utils.cpp')
-rw-r--r--test/utils/large_objects/large_object_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/utils/large_objects/large_object_utils.cpp b/test/utils/large_objects/large_object_utils.cpp
index b61ea49e..0afa7d6f 100644
--- a/test/utils/large_objects/large_object_utils.cpp
+++ b/test/utils/large_objects/large_object_utils.cpp
@@ -55,7 +55,7 @@ class ChunkPool final {
[[nodiscard]] auto operator[](std::size_t index) const noexcept
-> std::string const& {
- return gsl::at(pool_, index);
+ return gsl::at(pool_, gsl::narrow<gsl::index>(index));
}
private:
@@ -66,7 +66,7 @@ class ChunkPool final {
Randomizer randomizer{1, std::numeric_limits<char>::max()};
for (std::size_t i = 0; i < pool_.size(); ++i) {
- auto& chunk = gsl::at(pool_, i);
+ auto& chunk = gsl::at(pool_, gsl::narrow<gsl::index>(i));
chunk.resize(kChunkLength);
for (std::size_t j = 0; j < kChunkLength; ++j) {
chunk[j] = randomizer.Get();