~In this PR I suggest to use std::size_t as the size of the Array. The advantage is that it avoids sign conversions and it seems to simplify the logic.~
In order to avoid sign conversions I suggest to cast indices to std::size_t.
Checklist
[x] A description of the changes in this PR is mentioned above.
[x] All the new and existing tests pass.
[x] The code follows the code style and conventions of the project.
[x] No plagiarized, duplicated, or repetitive code that has been directly copied from another source.
[x] I have read the whole Contributing guidelines of the project and its resources/related pages.
Screenshots (if any)
Note to reviewers
~Use std::size_t as the size of Array.~
Cast indices to std::size_t in Array.
Description
~In this PR I suggest to use
std::size_t
as the size of theArray
. The advantage is that it avoids sign conversions and it seems to simplify the logic.~ In order to avoid sign conversions I suggest to cast indices tostd::size_t
.Checklist
Screenshots (if any)
Note to reviewers
~Use
std::size_t
as the size ofArray
.~ Cast indices tostd::size_t
inArray
.