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
Родитель 3fe1792b18
Коммит d19f5c1380
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -7,6 +7,8 @@
#define MOZILLA_GFX_BASESIZE_H_
#include <algorithm>
#include <ostream>
#include "mozilla/Attributes.h"
namespace mozilla {
@ -103,6 +105,11 @@ struct BaseSize {
return Sub(std::max(aA.width, aB.width),
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