Fix operator precedence order.

Clang (I guess it was clang) reports:

io/qipaddress.cpp:276:34: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]

Fix the precedence by wrapping the ternary expression in parentheses.

Change-Id: I1c995dc8e2b1b831480ea8f8a695f7f89c08fcac
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
bb10
Thiago Macieira 2012-03-28 21:03:38 -03:00 committed by Qt by Nokia
parent cc3ff3c1f6
commit 2d35844ee5
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ void toString(QString &appendTo, IPv6Address address)
// QString::reserve doesn't shrink, so it's fine to us
appendTo.reserve(appendTo.size() +
embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen);
(embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen));
// for finding where to place the "::"
int zeroRunLength = 0; // in octets