summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 17:18:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-07 10:17:03 +0200
commitdbd9ff5a29d60209ddff958ba9f8a1929011e5f7 (patch)
tree03b2ea28e519d921b21f51cc37186d2500de34e5
parent32d49d077fff5c63ec731191bff4daed06744afa (diff)
clang-tidy bugprone-use-after-move
Change-Id: I6213706ace039492429349c2459923b0e9a5d758 Reviewed-on: https://gerrit.libreoffice.org/60127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sal/qa/rtl/ref/rtl_ref.cxx4
-rw-r--r--vcl/source/font/fontmetric.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sal/qa/rtl/ref/rtl_ref.cxx b/sal/qa/rtl/ref/rtl_ref.cxx
index d8dc59e65839..e3987d9bb267 100644
--- a/sal/qa/rtl/ref/rtl_ref.cxx
+++ b/sal/qa/rtl/ref/rtl_ref.cxx
@@ -70,7 +70,7 @@ class TestReferenceRefCounting : public CppUnit::TestFixture
// test1 now contains a null pointer
CPPUNIT_ASSERT_MESSAGE("!test1.is()",
- !test1.is());
+ !test1.is()); // NOLINT(bugprone-use-after-move)
// function return should move the reference
test2 = get_reference( &cTestClass );
@@ -94,7 +94,7 @@ class TestReferenceRefCounting : public CppUnit::TestFixture
CPPUNIT_ASSERT_MESSAGE("!test1.is()",
!test1.is());
CPPUNIT_ASSERT_MESSAGE("!test2.is()",
- !test2.is());
+ !test2.is()); // NOLINT(bugprone-use-after-move)
CPPUNIT_ASSERT_EQUAL_MESSAGE("cTestClass.use_count() == 0",
static_cast<long>(0), cTestClass.use_count());
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index 6ed8fdb97496..5a108ca26f47 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -65,8 +65,8 @@ FontMetric& FontMetric::operator=(const FontMetric& rFontMetric)
FontMetric& FontMetric::operator=(FontMetric&& rFontMetric)
{
- Font::operator=(std::move(rFontMetric));
mxImplMetric = std::move(rFontMetric.mxImplMetric);
+ Font::operator=(std::move(rFontMetric));
return *this;
}