diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-25 16:15:25 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-27 11:13:31 +0200 |
commit | d88eba7e8f8f9951e48709a1503931025a592d6a (patch) | |
tree | b3466d2f03e44b19cc7e1d2748ed1fb791235dfb /sources/shiboken6/tests/libminimal | |
parent | f6d11df9409da11e084f57633025c2806735e8b7 (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/libminimal')
-rw-r--r-- | sources/shiboken6/tests/libminimal/listuser.cpp | 3 | ||||
-rw-r--r-- | sources/shiboken6/tests/libminimal/minbool.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sources/shiboken6/tests/libminimal/listuser.cpp b/sources/shiboken6/tests/libminimal/listuser.cpp index ba8f43902..93c399542 100644 --- a/sources/shiboken6/tests/libminimal/listuser.cpp +++ b/sources/shiboken6/tests/libminimal/listuser.cpp @@ -1,11 +1,10 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -#include <numeric> -#include <cstdlib> #include "listuser.h" #include <algorithm> +#include <cstdlib> #include <numeric> std::list<int> ListUser::createIntList(int num) diff --git a/sources/shiboken6/tests/libminimal/minbool.h b/sources/shiboken6/tests/libminimal/minbool.h index 4473df975..168ca4863 100644 --- a/sources/shiboken6/tests/libminimal/minbool.h +++ b/sources/shiboken6/tests/libminimal/minbool.h @@ -13,7 +13,7 @@ public: bool value() const { return m_value; } inline MinBool operator!() const { return MinBool(!m_value); } inline MinBool& operator|=(const MinBool& other) { - m_value = m_value | other.m_value; + m_value |= other.m_value; return *this; } |