From a8fc6fc51c6c9ef90ae1480f0ff4448d69b0e235 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 29 Apr 2024 12:27:59 +0200 Subject: Small changes to allow gsl-lite support The gsl-lite implementation is slightly more picky in terms of type conversions and constness resolution in initializers, therefore small changes were needed. --- test/utils/large_objects/large_object_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/utils/large_objects/large_object_utils.cpp') diff --git a/test/utils/large_objects/large_object_utils.cpp b/test/utils/large_objects/large_object_utils.cpp index 6c3000ff..de8e6c7d 100644 --- a/test/utils/large_objects/large_object_utils.cpp +++ b/test/utils/large_objects/large_object_utils.cpp @@ -21,8 +21,8 @@ #include #include +#include "gsl/gsl" #include "src/buildtool/file_system/file_system_manager.hpp" -#include "src/utils/cpp/gsl.hpp" namespace { class Randomizer final { @@ -53,7 +53,7 @@ class ChunkPool final { [[nodiscard]] auto operator[](std::size_t index) const noexcept -> std::string const& { - return gsl::at(pool_, static_cast(index)); + return gsl::at(pool_, index); } private: @@ -64,7 +64,7 @@ class ChunkPool final { Randomizer randomizer{1, std::numeric_limits::max()}; for (std::size_t i = 0; i < pool_.size(); ++i) { - auto& chunk = gsl::at(pool_, static_cast(i)); + auto& chunk = gsl::at(pool_, i); chunk.resize(kChunkLength); for (std::size_t j = 0; j < kChunkLength; ++j) { chunk[j] = randomizer.Get(); -- cgit v1.2.3