aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-26 21:29:40 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-10-02 13:19:51 +0200
commit0363a8799eaaa394defc8b509c4c1858584512b8 (patch)
tree0f8ff3702b7d18d37193a92ad3c288044f4aa9f0 /sources/shiboken6/tests
parentcb067123b3f804c1e2994c4c37c3b5fc6376f914 (diff)
Fix static analysis warnings about using = default in the shiboken tests
Pick-to: 6.6 6.5 Change-Id: Id72835771375fc2d6b5f1d81c36881cdca76cd15 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/tests')
-rw-r--r--sources/shiboken6/tests/libminimal/listuser.h2
-rw-r--r--sources/shiboken6/tests/libminimal/val.h2
-rw-r--r--sources/shiboken6/tests/libsample/ctorconvrule.h2
-rw-r--r--sources/shiboken6/tests/libsample/mapuser.h4
-rw-r--r--sources/shiboken6/tests/libsample/modifications.h4
-rw-r--r--sources/shiboken6/tests/libsample/multiple_derived.h4
-rw-r--r--sources/shiboken6/tests/libsample/oddbool.h2
-rw-r--r--sources/shiboken6/tests/libsample/overload.h4
-rw-r--r--sources/shiboken6/tests/libsample/photon.h2
-rw-r--r--sources/shiboken6/tests/libsample/pointf.h2
-rw-r--r--sources/shiboken6/tests/libsample/polygon.h2
-rw-r--r--sources/shiboken6/tests/libsample/protected.h8
-rw-r--r--sources/shiboken6/tests/libsample/reference.h4
-rw-r--r--sources/shiboken6/tests/libsample/samplenamespace.h2
14 files changed, 22 insertions, 22 deletions
diff --git a/sources/shiboken6/tests/libminimal/listuser.h b/sources/shiboken6/tests/libminimal/listuser.h
index e77e156f5..e11f7638b 100644
--- a/sources/shiboken6/tests/libminimal/listuser.h
+++ b/sources/shiboken6/tests/libminimal/listuser.h
@@ -14,7 +14,7 @@
struct LIBMINIMAL_API ListUser
{
- virtual ~ListUser() {}
+ virtual ~ListUser() = default;
// List of C++ primitive type items
virtual std::list<int> createIntList(int num);
diff --git a/sources/shiboken6/tests/libminimal/val.h b/sources/shiboken6/tests/libminimal/val.h
index af53263bd..f6a19c166 100644
--- a/sources/shiboken6/tests/libminimal/val.h
+++ b/sources/shiboken6/tests/libminimal/val.h
@@ -10,7 +10,7 @@ class LIBMINIMAL_API Val
{
public:
explicit Val(int valId) : m_valId(valId) {}
- virtual ~Val() {}
+ virtual ~Val() = default;
int valId() const { return m_valId; }
void setValId(int valId) { m_valId = valId; }
diff --git a/sources/shiboken6/tests/libsample/ctorconvrule.h b/sources/shiboken6/tests/libsample/ctorconvrule.h
index cd7d1c669..96862288a 100644
--- a/sources/shiboken6/tests/libsample/ctorconvrule.h
+++ b/sources/shiboken6/tests/libsample/ctorconvrule.h
@@ -10,7 +10,7 @@ class CtorConvRule
{
public:
explicit CtorConvRule(long value) : m_value(value) {}
- virtual ~CtorConvRule() {}
+ virtual ~CtorConvRule() = default;
virtual void dummyVirtualMethod() {}
long value() { return m_value; }
private:
diff --git a/sources/shiboken6/tests/libsample/mapuser.h b/sources/shiboken6/tests/libsample/mapuser.h
index 4783e5682..a6de0b427 100644
--- a/sources/shiboken6/tests/libsample/mapuser.h
+++ b/sources/shiboken6/tests/libsample/mapuser.h
@@ -17,8 +17,8 @@
class LIBSAMPLE_API MapUser
{
public:
- MapUser() {}
- virtual ~MapUser() {}
+ MapUser() noexcept = default;
+ virtual ~MapUser() = default;
virtual std::map<std::string, std::pair<Complex, int> > createMap();
std::map<std::string, std::pair<Complex, int> > callCreateMap();
diff --git a/sources/shiboken6/tests/libsample/modifications.h b/sources/shiboken6/tests/libsample/modifications.h
index 4ade7c444..1cc8153b5 100644
--- a/sources/shiboken6/tests/libsample/modifications.h
+++ b/sources/shiboken6/tests/libsample/modifications.h
@@ -129,8 +129,8 @@ private:
class LIBSAMPLE_API AbstractModifications : public Modifications
{
public:
- AbstractModifications() {}
- ~AbstractModifications() override {}
+ AbstractModifications() noexcept = default;
+ ~AbstractModifications() override = default;
inline bool invert(bool value) { return !value; }
diff --git a/sources/shiboken6/tests/libsample/multiple_derived.h b/sources/shiboken6/tests/libsample/multiple_derived.h
index 243b6a21e..5a7cd932e 100644
--- a/sources/shiboken6/tests/libsample/multiple_derived.h
+++ b/sources/shiboken6/tests/libsample/multiple_derived.h
@@ -37,7 +37,7 @@ class LIBSAMPLE_API MDerived1 : public Base1, public Base2
{
public:
MDerived1();
- ~MDerived1() override {}
+ ~MDerived1() override = default;
int mderived1Method() { return m_value; }
int base1Method () override { return Base1::base1Method() * 10; }
@@ -116,7 +116,7 @@ class LIBSAMPLE_API MDerived2 : public Base3, public Base4, public Base5, public
{
public:
MDerived2();
- virtual ~MDerived2() {}
+ virtual ~MDerived2() = default;
inline int base4Method() { return Base3::base3Method() * 10; }
inline int mderived2Method() { return m_value; }
diff --git a/sources/shiboken6/tests/libsample/oddbool.h b/sources/shiboken6/tests/libsample/oddbool.h
index 1d6524443..b91f37e0a 100644
--- a/sources/shiboken6/tests/libsample/oddbool.h
+++ b/sources/shiboken6/tests/libsample/oddbool.h
@@ -37,7 +37,7 @@ class OddBoolUser
public:
OddBoolUser() : m_oddbool(OddBool(false)) {}
OddBoolUser(const OddBool &oddBool) : m_oddbool(oddBool) {}
- virtual ~OddBoolUser() {}
+ virtual ~OddBoolUser() = default;
inline OddBool oddBool() { return m_oddbool; }
inline void setOddBool(OddBool oddBool) { m_oddbool = oddBool; }
diff --git a/sources/shiboken6/tests/libsample/overload.h b/sources/shiboken6/tests/libsample/overload.h
index c6f9dcc17..08d841ee6 100644
--- a/sources/shiboken6/tests/libsample/overload.h
+++ b/sources/shiboken6/tests/libsample/overload.h
@@ -32,8 +32,8 @@ public:
Param1
};
- Overload() {}
- virtual ~Overload() {}
+ Overload() noexcept = default;
+ virtual ~Overload() = default;
FunctionEnum overloaded();
FunctionEnum overloaded(Size *size);
diff --git a/sources/shiboken6/tests/libsample/photon.h b/sources/shiboken6/tests/libsample/photon.h
index 03c45507a..1144f17dc 100644
--- a/sources/shiboken6/tests/libsample/photon.h
+++ b/sources/shiboken6/tests/libsample/photon.h
@@ -84,7 +84,7 @@ LIBSAMPLE_API int countValueDuplicators(const std::list<TemplateBase<DuplicatorT
class Pointer
{
public:
- Pointer() noexcept {}
+ Pointer() noexcept = default;
explicit Pointer(int *p) : px(p) {}
void reset() noexcept { Pointer().swap(*this); }
diff --git a/sources/shiboken6/tests/libsample/pointf.h b/sources/shiboken6/tests/libsample/pointf.h
index 0ebbda579..c8c021f2e 100644
--- a/sources/shiboken6/tests/libsample/pointf.h
+++ b/sources/shiboken6/tests/libsample/pointf.h
@@ -14,7 +14,7 @@ class LIBSAMPLE_API PointF
public:
PointF(const Point &point);
PointF(double x = 0.0, double y = 0.0);
- ~PointF() {}
+ ~PointF() noexcept = default;
inline double x() const { return m_x; }
inline double y() const { return m_y; }
diff --git a/sources/shiboken6/tests/libsample/polygon.h b/sources/shiboken6/tests/libsample/polygon.h
index 6ae535df1..2424ddd51 100644
--- a/sources/shiboken6/tests/libsample/polygon.h
+++ b/sources/shiboken6/tests/libsample/polygon.h
@@ -14,7 +14,7 @@ class LIBSAMPLE_API Polygon // should be moveable
public:
using PointList = std::list<Point>;
- Polygon() {}
+ Polygon() noexcept = default;
Polygon(double x, double y);
Polygon(Point point);
Polygon(PointList points);
diff --git a/sources/shiboken6/tests/libsample/protected.h b/sources/shiboken6/tests/libsample/protected.h
index 9a862a668..ba061adba 100644
--- a/sources/shiboken6/tests/libsample/protected.h
+++ b/sources/shiboken6/tests/libsample/protected.h
@@ -38,7 +38,7 @@ class LIBSAMPLE_API ProtectedPolymorphic
{
public:
explicit ProtectedPolymorphic(const char *name) : m_name(name) {}
- virtual ~ProtectedPolymorphic() {}
+ virtual ~ProtectedPolymorphic() = default;
inline static ProtectedPolymorphic *create()
{ return new ProtectedPolymorphic("created"); }
@@ -73,7 +73,7 @@ public:
class LIBSAMPLE_API ProtectedVirtualDestructor
{
public:
- ProtectedVirtualDestructor() {}
+ ProtectedVirtualDestructor() noexcept = default;
inline static ProtectedVirtualDestructor *create()
{ return new ProtectedVirtualDestructor(); }
inline static int dtorCalled() { return dtor_called; }
@@ -87,8 +87,8 @@ private:
class LIBSAMPLE_API ProtectedEnumClass
{
public:
- ProtectedEnumClass() {}
- virtual ~ProtectedEnumClass() {}
+ ProtectedEnumClass() noexcept = default;
+ virtual ~ProtectedEnumClass() = default;
enum PublicEnum {
PublicItem0,
PublicItem1
diff --git a/sources/shiboken6/tests/libsample/reference.h b/sources/shiboken6/tests/libsample/reference.h
index e21cb02d7..7153d543e 100644
--- a/sources/shiboken6/tests/libsample/reference.h
+++ b/sources/shiboken6/tests/libsample/reference.h
@@ -45,8 +45,8 @@ private:
class LIBSAMPLE_API ObjTypeReference
{
public:
- ObjTypeReference() = default;
- ObjTypeReference(const ObjTypeReference &) {}
+ ObjTypeReference() noexcept = default;
+ ObjTypeReference(const ObjTypeReference &) = default;
virtual ~ObjTypeReference();
virtual ObjTypeReference &returnMyFirstArg(ObjTypeReference &ref) { return ref; }
diff --git a/sources/shiboken6/tests/libsample/samplenamespace.h b/sources/shiboken6/tests/libsample/samplenamespace.h
index 431b68eb2..ad1388b44 100644
--- a/sources/shiboken6/tests/libsample/samplenamespace.h
+++ b/sources/shiboken6/tests/libsample/samplenamespace.h
@@ -91,7 +91,7 @@ public:
class OkThisIsRecursiveEnough
{
public:
- virtual ~OkThisIsRecursiveEnough() {}
+ virtual ~OkThisIsRecursiveEnough() = default;
enum NiceEnum {
NiceValue1, NiceValue2
};