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

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue May 7 15:32:42 CEST 2019

On 07/05/2019 14:13, Ola Røer Thorsen wrote:
> 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.

Could you make an example where the casts are needed? Maybe the code can 
be rearranged in a way that the casts are NOT needed in the first place.

Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190507/1ec54e40/attachment.bin>

More information about the Interest mailing list