Kaydet (Commit) dbd9ff5a authored tarafından Noel Grandin's avatar Noel Grandin

clang-tidy bugprone-use-after-move

Change-Id: I6213706ace039492429349c2459923b0e9a5d758
Reviewed-on: https://gerrit.libreoffice.org/60127
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 32d49d07
......@@ -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());
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment