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
parent
cc3ff3c1f6
commit
2d35844ee5
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue