Bug 1596339 Part 7 - Delete unused operator<< for nsRect. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 15 Nov 2019 03:52:21 +0000
changeset 502121 1e1617c67238dfb685fb3d07bf1793232c4469fa
parent 502120 a7a60ea3a7e06ff5b14a1cbb8c653637362b41bb
child 502122 58d5d2a329f5cdb6b7a4d2f866d142340b4e7686
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1596339
milestone72.0a1
first release with
nightly linux32
1e1617c67238 / 72.0a1 / 20191115095319 / files
nightly linux64
1e1617c67238 / 72.0a1 / 20191115095319 / files
nightly mac
1e1617c67238 / 72.0a1 / 20191115095319 / files
nightly win32
1e1617c67238 / 72.0a1 / 20191115095319 / files
nightly win64
1e1617c67238 / 72.0a1 / 20191115095319 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596339 Part 7 - Delete unused operator<< for nsRect. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D53118
gfx/src/nsRect.cpp
gfx/src/nsRect.h
--- a/gfx/src/nsRect.cpp
+++ b/gfx/src/nsRect.cpp
@@ -27,31 +27,8 @@ bool nsRect::Overflows() const {
 #else
   mozilla::CheckedInt<int32_t> xMost = this->x;
   xMost += this->width;
   mozilla::CheckedInt<int32_t> yMost = this->y;
   yMost += this->height;
   return !xMost.isValid() || !yMost.isValid();
 #endif
 }
-
-#ifdef DEBUG
-// Diagnostics
-
-FILE* operator<<(FILE* out, const nsRect& rect) {
-  nsAutoString tmp;
-
-  // Output the coordinates in fractional pixels so they're easier to read
-  tmp.Append('{');
-  tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.X(), AppUnitsPerCSSPixel()));
-  tmp.AppendLiteral(", ");
-  tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.Y(), AppUnitsPerCSSPixel()));
-  tmp.AppendLiteral(", ");
-  tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.Width(), AppUnitsPerCSSPixel()));
-  tmp.AppendLiteral(", ");
-  tmp.AppendFloat(
-      NSAppUnitsToFloatPixels(rect.Height(), AppUnitsPerCSSPixel()));
-  tmp.Append('}');
-  fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
-  return out;
-}
-
-#endif  // DEBUG
--- a/gfx/src/nsRect.h
+++ b/gfx/src/nsRect.h
@@ -488,14 +488,9 @@ template <class units>
 nsRect ToAppUnits(const mozilla::gfx::IntRectTyped<units>& aRect,
                   nscoord aAppUnitsPerPixel) {
   return nsRect(NSIntPixelsToAppUnits(aRect.X(), aAppUnitsPerPixel),
                 NSIntPixelsToAppUnits(aRect.Y(), aAppUnitsPerPixel),
                 NSIntPixelsToAppUnits(aRect.Width(), aAppUnitsPerPixel),
                 NSIntPixelsToAppUnits(aRect.Height(), aAppUnitsPerPixel));
 }
 
-#ifdef DEBUG
-// Diagnostics
-extern FILE* operator<<(FILE* out, const nsRect& rect);
-#endif  // DEBUG
-
 #endif /* NSRECT_H */