diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2023-08-26 12:37:18 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-08-28 13:16:40 +0000 |
commit | 154096822eaf045a90b7ac451d42da2d9fac8753 (patch) | |
tree | 06b7cdc2b6163b7d34d7dc3f4fdf03c743afe5bc | |
parent | 4b250a46d72fd7fe7ac3ab2859e10c2651a41720 (diff) |
Remove the redundant 'inline' keyword for in-class-body member functions
Fixes: QTBUG-116415
Change-Id: I53fdaa63c19c8f7b3d1ac3c63f130520b6f0dd15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
(cherry picked from commit 8a7855c7bd92275b5c34e12a32730129b4fb576c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/protobuf/qtprotobuftypes.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/protobuf/qtprotobuftypes.h b/src/protobuf/qtprotobuftypes.h index 2e89ed2..6ee163c 100644 --- a/src/protobuf/qtprotobuftypes.h +++ b/src/protobuf/qtprotobuftypes.h @@ -43,7 +43,7 @@ struct QProtobufPropertyOrdering Q_PROTOBUF_EXPORT int getPropertyIndex(int index) const; Q_PROTOBUF_EXPORT uint getFieldFlags(int index) const; Q_PROTOBUF_EXPORT int indexOfFieldNumber(int fieldNumber) const; - inline int fieldCount() const { return int(data->numFields); } + int fieldCount() const { return int(data->numFields); } private: const uint *uint_data() const; @@ -57,26 +57,26 @@ extern Q_PROTOBUF_EXPORT void registerOrdering(QMetaType type, QProtobufProperty // Convenience structure to hold a reference to a single entry struct QProtobufPropertyOrderingInfo { - inline QProtobufPropertyOrderingInfo(QProtobufPropertyOrdering ord, int ind) + QProtobufPropertyOrderingInfo(QProtobufPropertyOrdering ord, int ind) : ordering(ord), index(ind) { Q_ASSERT(index >= 0); } - inline QUtf8StringView getJsonName() const { return ordering.getJsonName(index); } - inline int getFieldNumber() const + QUtf8StringView getJsonName() const { return ordering.getJsonName(index); } + int getFieldNumber() const { return (overrideFieldNumber >= 0) ? overrideFieldNumber : ordering.getFieldNumber(index); } - inline int getPropertyIndex() const { return ordering.getPropertyIndex(index); } - inline uint getFieldFlags() const { return ordering.getFieldFlags(index); } + int getPropertyIndex() const { return ordering.getPropertyIndex(index); } + uint getFieldFlags() const { return ordering.getFieldFlags(index); } // Needed for maps, which uses field number 1 and 2 for key and value respectively QProtobufPropertyOrderingInfo infoForMapKey() const { return { ordering, index, 1 }; } QProtobufPropertyOrderingInfo infoForMapValue() const { return { ordering, index, 2 }; } private: - inline QProtobufPropertyOrderingInfo(QProtobufPropertyOrdering ord, int ind, int fieldNumber) + QProtobufPropertyOrderingInfo(QProtobufPropertyOrdering ord, int ind, int fieldNumber) : ordering(ord), index(ind), overrideFieldNumber(fieldNumber) { } |