summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytedata_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-07-18 09:05:18 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-07-20 11:15:56 +0000
commitce2ba5d59d3c4641245e51f94215c0b4bac1f792 (patch)
tree2c5746657a4a684e04630e54cb0d4287f0436615 /src/corelib/text/qbytedata_p.h
parent440f91bd0d7da0e3061b52bde1b60c93e2179b38 (diff)
Port QByteDataBuffer to qsizetype
Less impedance mismatch with the other Qt containers. As a drive-by, fix code style in the touched lines, and remove superfluous inline keywords. Pick-to: 6.4 6.3 Change-Id: I2c9444a8f956e58c361104a19f55fcc783cd1a1d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/text/qbytedata_p.h')
-rw-r--r--src/corelib/text/qbytedata_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qbytedata_p.h b/src/corelib/text/qbytedata_p.h
index 9851cd17e0..67a39eb742 100644
--- a/src/corelib/text/qbytedata_p.h
+++ b/src/corelib/text/qbytedata_p.h
@@ -229,7 +229,7 @@ public:
}
// the number of QByteArrays
- inline int bufferCount() const
+ qsizetype bufferCount() const
{
return buffers.length();
}
@@ -247,7 +247,7 @@ public:
return buffers.first().size() - firstPos;
}
- inline QByteArray& operator[](int i)
+ QByteArray &operator[](qsizetype i)
{
if (i == 0)
squeezeFirst();
@@ -256,7 +256,7 @@ public:
}
inline bool canReadLine() const {
- int i = 0;
+ qsizetype i = 0;
if (i < buffers.length()) {
if (buffers.at(i).indexOf('\n', firstPos) != -1)
return true;