diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-15 18:07:37 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-06-15 18:40:37 +0200 |
commit | d0b3aaecd90ba7d899c5ee950c836376e7a87eb9 (patch) | |
tree | ff8ff112e13b23856d4cf84e031ea3b1eb4dba47 /src/corelib/tools/qstring.cpp | |
parent | f2bd46d1df587a3d9eac485c5e98caa98b12909d (diff) |
Make QIPAddressUtils::toString() const-correct for IPv6
The IPv4 overload takes a IPv4Address, which is just an quint32, so it
doesn't matter whether clients call it with a const or a mutable
argument.
The IPv6 overload, OTOH, took a IPv6Address, which is a typedef for
quint8[16]. This allows users to pass a quint16[16], but not a const
quint8[16], because that would lose the const. The function, however,
doesn't modify the argument, so it could be const.
Make it so, even though, due to the typedef, it looks like a redundant
top-level const.
Change-Id: I0506f6f9026ad616c4450fceb45fea137ac27692
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
0 files changed, 0 insertions, 0 deletions