Make operator* a member of struct size
instead of being global
This commit is contained in:
parent
06467c38d8
commit
f97c6e9eb0
@ -392,10 +392,10 @@ struct size {
|
||||
}
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
size operator*(double scale) {
|
||||
return size(width*scale, height*scale);
|
||||
}
|
||||
};
|
||||
size operator*(size lhs, double scale) {
|
||||
return size(lhs.width*scale, lhs.height*scale);
|
||||
}
|
||||
std::ostream& operator<<(std::ostream& stream, size sz) {
|
||||
stream << sz.width << "x" << sz.height;
|
||||
return stream;
|
||||
|
Loading…
Reference in New Issue
Block a user