aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/polygon.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-25 16:15:25 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-27 11:13:31 +0200
commitd88eba7e8f8f9951e48709a1503931025a592d6a (patch)
treeb3466d2f03e44b19cc7e1d2748ed1fb791235dfb /sources/shiboken6/tests/libsample/polygon.cpp
parentf6d11df9409da11e084f57633025c2806735e8b7 (diff)
Fix some static analysis warnings in the shiboken tests
- else after return - Do not repeat return types - Use range-based for for std::map - Use constructor member initialization - Initialize variables - Use override instead of repeating virtual - Use noexcept for move special functions - Upper case integer literals - Various other small fixes Pick-to: 6.6 6.5 Change-Id: I06924c60fcd0d8bfcad9cc2cd6e79e72621cb766 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/libsample/polygon.cpp')
-rw-r--r--sources/shiboken6/tests/libsample/polygon.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/sources/shiboken6/tests/libsample/polygon.cpp b/sources/shiboken6/tests/libsample/polygon.cpp
index 789b94ac1..6af597192 100644
--- a/sources/shiboken6/tests/libsample/polygon.cpp
+++ b/sources/shiboken6/tests/libsample/polygon.cpp
@@ -3,19 +3,16 @@
#include "polygon.h"
-Polygon::Polygon(double x, double y)
+Polygon::Polygon(double x, double y) : m_points({Point(x, y)})
{
- m_points.push_back(Point(x, y));
}
-Polygon::Polygon(Point point)
+Polygon::Polygon(Point point) : m_points({point})
{
- m_points.push_back(point);
}
-Polygon::Polygon(PointList points)
+Polygon::Polygon(PointList points) : m_points(points)
{
- m_points = points;
}
void Polygon::addPoint(Point point)