Commit 0cfda413 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

make bounded() unambiguous

std::size_t is the unsigned integer type of the result of the sizeof

this can make the bounded call ambiguous as it either sports
an int(int,int) signature or an quint32(quint32,quint32) signature. with
size_t being unsigned and 0 being int it's not necessarily clear to the
compiler which overload to use, so make it clear by using usigned
this specifically fixes arm32 compatibility on ubuntu 20.04
parent 67d89ffc
......@@ -179,7 +179,8 @@ saltCharacter() {
int index = QRandomGenerator::system()->bounded(0, (sizeof(saltCharacters)/sizeof(*saltCharacters)));
const quint32 index =
QRandomGenerator::system()->bounded(0u, (sizeof(saltCharacters)/sizeof(*saltCharacters)));
return saltCharacters[index];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment