aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/ApiExtractor/textstream.h4
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/sources/shiboken6/ApiExtractor/textstream.h b/sources/shiboken6/ApiExtractor/textstream.h
index 074e23858..940dda9a9 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 dac4ab994..961d410a4 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)
@@ -2370,9 +2370,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);
@@ -3487,7 +3487,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
@@ -6180,7 +6180,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,