Bug 1453610 - Add a '*&' to a self-assignment to silent a -Wself-assign warning r=froydnj
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 12 Apr 2018 13:42:20 +0200
changeset 412981 daed9174cdab67adb51b3923d143c3c905f14689
parent 412980 775374240991a0bb94bea3e0a24d3750b92a5f13
child 412982 b1704c46dd795635702b9e2d1aab9e57c9764957
push id33828
push userarchaeopteryx@coole-files.de
push dateThu, 12 Apr 2018 19:19:41 +0000
treeherdermozilla-central@6e22c4a726c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1453610
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453610 - Add a '*&' to a self-assignment to silent a -Wself-assign warning r=froydnj MozReview-Commit-ID: 64ZMlMV9YR8
xpcom/tests/gtest/TestTArray.cpp
--- a/xpcom/tests/gtest/TestTArray.cpp
+++ b/xpcom/tests/gtest/TestTArray.cpp
@@ -131,17 +131,17 @@ TEST(TArray, Assign)
   ASSERT_EQ(DummyArray(), array2);
 }
 
 TEST(TArray, AssignmentOperatorSelfAssignment)
 {
   nsTArray<int> array;
   array = DummyArray();
 
-  array = array;
+  array = *&array;
   ASSERT_EQ(DummyArray(), array);
   array = Move(array);
   ASSERT_EQ(DummyArray(), array);
 }
 
 TEST(TArray, CopyOverlappingForwards)
 {
   const size_t rangeLength = 8;