[Interest] Operator QMap<uint, uint>[] is casting to int?

Ola Røer Thorsen ola at silentwings.no
Tue May 7 14:13:33 CEST 2019


lør. 4. mai 2019 kl. 17:51 skrev Thiago Macieira <thiago.macieira at intel.com
>:

> No, the size of something definitely fits in int on 32-bit systems. And
> why do
> you need to do any static_cast in the first place?
>

We build our code using gcc with the options "-Wall -Wextra -Werror" and
this leads us to have to use static_cast for example when comparing int and
unsigned int (or std::size_t). A mix of using std::array, std::string and
QVector/QByteArray often gives a few extra static casts, not that it
bothers me too much.

Cheers,
Ola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190507/aa50c2b9/attachment.html>


More information about the Interest mailing list