diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-05-04 15:15:13 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-05-28 11:46:13 +0200 |
commit | 95542698aa3293f6ed5d4a2902b6ea3a1caa9762 (patch) | |
tree | 9617baa017efafa542e516d1ae5884e983a2b7e7 | |
parent | 41f6826546f274805a6e96927b0c99eda0045358 (diff) |
tst_moc: fix returning-reference-to-local warning
Although the code is never executed compilers still throw a warning
because it's compiled.
Amends 12b8283f899ebcf401d974927314b9531334a56e
Change-Id: Ib790d4bcb33c4b9f2a55a784b852275b59debde9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 48931167fb5341dc26e27dae03b2112d83daa3b6)
-rw-r--r-- | tests/auto/tools/moc/cxx11-trailing-return.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/tools/moc/cxx11-trailing-return.h b/tests/auto/tools/moc/cxx11-trailing-return.h index 26178ff68e..50f341e1c3 100644 --- a/tests/auto/tools/moc/cxx11-trailing-return.h +++ b/tests/auto/tools/moc/cxx11-trailing-return.h @@ -43,12 +43,12 @@ public slots: inline auto constRefReturn() -> const CXX11TrailingReturn & { - return {}; + return *this; } inline auto constConstRefReturn() const -> const CXX11TrailingReturn & { - return {}; + return *this; } signals: |