aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/ApiExtractor/textstream.h4
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/sources/shiboken6/ApiExtractor/textstream.h b/sources/shiboken6/ApiExtractor/textstream.h
index 8a3cbb0bb..d7199b9b5 100644
--- a/sources/shiboken6/ApiExtractor/textstream.h
+++ b/sources/shiboken6/ApiExtractor/textstream.h
@@ -31,7 +31,7 @@ public:
virtual ~TextStream();
Language language() const { return m_language; }
- void setLanguage(const Language &language) { m_language = language; }
+ void setLanguage(Language language) { m_language = language; }
bool isIndentationEnabled() const { return m_indentationEnabled; }
void setIndentationEnabled(bool m)
@@ -85,7 +85,7 @@ public:
TextStream &operator<<(qsizetype t) { putSizeType(t); return *this; }
#endif
- inline TextStream &operator<<(QTextStreamManipulator m) { m_str << m; return *this; }
+ inline TextStream &operator<<(const QTextStreamManipulator &m) { m_str << m; return *this; }
inline TextStream &operator<<(ManipulatorFunc f) { f(*this); return *this; }
void putRepetitiveChars(char c, int count);
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 850535e5a..567cb6f1d 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -64,9 +64,9 @@ static QString mangleName(QString name)
struct sbkUnusedVariableCast
{
- explicit sbkUnusedVariableCast(QString name) : m_name(name) {}
+ explicit sbkUnusedVariableCast(QStringView name) : m_name(name) {}
- const QString m_name;
+ const QStringView m_name;
};
TextStream &operator<<(TextStream &str, const sbkUnusedVariableCast &c)
@@ -2307,9 +2307,9 @@ void CppGenerator::writeMethodWrapper(TextStream &s, const OverloadData &overloa
}
s << ")\n{\n" << indent;
if (rfunc->ownerClass() == nullptr || overloadData.hasStaticFunction())
- s << sbkUnusedVariableCast(u"self"_s);
+ s << sbkUnusedVariableCast(u"self");
if (hasKwdArgs)
- s << sbkUnusedVariableCast(u"kwds"_s);
+ s << sbkUnusedVariableCast(u"kwds");
writeMethodWrapperPreamble(s, overloadData, classContext);
@@ -3424,7 +3424,7 @@ void CppGenerator::writeIsPythonConvertibleToCppFunction(TextStream &s,
<< "return Shiboken::Conversions::nonePythonToCppNullPtr;\n" << outdent;
} else {
if (!condition.contains(u"pyIn"))
- s << sbkUnusedVariableCast(u"pyIn"_s);
+ s << sbkUnusedVariableCast(u"pyIn");
}
s << "if (" << condition << ")\n" << indent
<< "return " << pythonToCppFuncName << ";\n" << outdent
@@ -5428,7 +5428,7 @@ void CppGenerator::writeEnumsInitialization(TextStream &s, AbstractMetaEnumList
etypeUsed |= writeEnumInitialization(s, cppEnum);
}
if (preambleWritten && !etypeUsed)
- s << sbkUnusedVariableCast(u"EType"_s);
+ s << sbkUnusedVariableCast(u"EType");
}
static qsizetype maxLineLength(const QStringList &list)
@@ -5973,7 +5973,7 @@ void CppGenerator::writeTypeDiscoveryFunction(TextStream &s,
s << "static void *" << cpythonBaseName(metaClass)
<< "_typeDiscovery(void *cptr, PyTypeObject *instanceType)\n{\n" << indent
<< sbkUnusedVariableCast(u"cptr"_s)
- << sbkUnusedVariableCast(u"instanceType"_s);
+ << sbkUnusedVariableCast(u"instanceType");
if (!polymorphicExpr.isEmpty()) {
polymorphicExpr = polymorphicExpr.replace(u"%1"_s,