diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-06-15 20:25:49 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2021-06-17 09:54:42 +0000 |
commit | bf04c98c1c3d8e03db61b0811e1cc47517c49afa (patch) | |
tree | f0b84dd13e5610f90e9d9e08f109a6865cb70625 /src/plugins/cpaster | |
parent | 4bfcea22bf31ad7d9718d5d30402d74ba0568dac (diff) |
Do not pass QStringView by const reference
That's what the documentation says:
https://doc.qt.io/qt-6/qstringview.html#details
Change-Id: I0b41fc4abad1601c0ed416a505534cf7ae7633e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r-- | src/plugins/cpaster/pastebindotcomprotocol.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/cpaster/pastebindotcomprotocol.cpp b/src/plugins/cpaster/pastebindotcomprotocol.cpp index c503bfe333..7ff8469ea2 100644 --- a/src/plugins/cpaster/pastebindotcomprotocol.cpp +++ b/src/plugins/cpaster/pastebindotcomprotocol.cpp @@ -242,7 +242,7 @@ struct Attribute { }; } -static QList<Attribute> toAttributes(const QStringView &attributes) +static QList<Attribute> toAttributes(QStringView attributes) { QList<Attribute> result; const QRegularExpression att("\\s+([a-zA-Z]+)\\s*=\\s*('.*?'|\".*?\")"); @@ -260,8 +260,8 @@ static QList<Attribute> toAttributes(const QStringView &attributes) return result; } -static inline ParseState nextOpeningState(ParseState current, const QStringView &tagView, - const QStringView &attributesView) +static inline ParseState nextOpeningState(ParseState current, QStringView tagView, + QStringView attributesView) { switch (current) { case OutSideTable: @@ -300,7 +300,7 @@ static inline ParseState nextOpeningState(ParseState current, const QStringView return ParseError; } -static inline ParseState nextClosingState(ParseState current, const QStringView &element) +static inline ParseState nextClosingState(ParseState current, QStringView element) { switch (current) { case OutSideTable: |