diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-12-11 09:28:35 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-12-12 01:57:48 +0100 |
| commit | 928719d77982033f84ae73eb8eb37fcae5a77ad6 (patch) | |
| tree | c20dbd889a1cb2e20818a0c41b45c1020a2a079e /src/tools/qdoc/cppcodemarker.h | |
| parent | 1a1d22a7b56b6bcd604797e3a8ff30ea02d466ba (diff) | |
QEasingCurve: fix TCBPoint default constructor
As pointed out by ClangSA highlighing in QtCreator, but also by
Coverity, the way the TCBPoint default constructor was written meant
that _t, _c, and _b were left uninitialized even if the user
value-initialized a TCBPoint object:
TCBPoint p = {}; // ought to zero-initialize, but doesn't
Fix by removing all the constructors. Being just a POD^Waggregate is
more than sufficient for this type and aggregate initialization
behaves predictably:
TCBPoint p; // partially-formed (_t, _b, _c are uninitialized)
TCBPoint p = {}; // well-formed, value-initialized: _t, _c, _b are 0.0
Amends b9f0bde16e85161666d5090952955bebacc40f89.
Coverity-Id: 11609
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: I301e5a7b68e86ddf967348b683f7a97fdc0b598d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.h')
0 files changed, 0 insertions, 0 deletions
