Bug 1321412 - Add an operator<< to BaseSize. r=kats

MozReview-Commit-ID: 4zVkyafxtfG

--HG--
extra : rebase_source : 4a5a3f09ab0008d7e736cedb817505e6e45b054c
This commit is contained in:
Botond Ballo 2016-11-25 20:46:58 -05:00
parent 3fe1792b18
commit d19f5c1380

View File

@ -7,6 +7,8 @@
#define MOZILLA_GFX_BASESIZE_H_ #define MOZILLA_GFX_BASESIZE_H_
#include <algorithm> #include <algorithm>
#include <ostream>
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
namespace mozilla { namespace mozilla {
@ -103,6 +105,11 @@ struct BaseSize {
return Sub(std::max(aA.width, aB.width), return Sub(std::max(aA.width, aB.width),
std::max(aA.height, aB.height)); std::max(aA.height, aB.height));
} }
friend std::ostream& operator<<(std::ostream& aStream,
const BaseSize<T, Sub>& aSize) {
return aStream << aSize.width << " x " << aSize.height;
}
}; };
} // namespace gfx } // namespace gfx