Merge pull request #6126 from adamreichold/fix-signed-unsigned-comparison-warning

Fix GCC warning about comparing signed and unsigned integers.
This commit is contained in:
Adam Reichold 2021-02-22 20:53:32 +01:00 committed by GitHub
commit a349559e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,13 +184,13 @@ public:
// use with indices // use with indices
T * operator[](int index) T * operator[](int index)
{ {
assert((index >= 0) && (index < rows.size())); assert((index >= 0) && (std::size_t(index) < rows.size()));
return rows[index]; return rows[index];
} }
const T * operator[](int index) const const T * operator[](int index) const
{ {
assert((index >= 0) && (index < rows.size())); assert((index >= 0) && (std::size_t(index) < rows.size()));
return rows[index]; return rows[index];
} }