Make operator* a member of struct size
instead of being global
This commit is contained in:
parent
06467c38d8
commit
f97c6e9eb0
1 changed files with 3 additions and 3 deletions
|
@ -392,10 +392,10 @@ struct size {
|
|||
}
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
};
|
||||
size operator*(size lhs, double scale) {
|
||||
return size(lhs.width*scale, lhs.height*scale);
|
||||
size operator*(double scale) {
|
||||
return size(width*scale, height*scale);
|
||||
}
|
||||
};
|
||||
std::ostream& operator<<(std::ostream& stream, size sz) {
|
||||
stream << sz.width << "x" << sz.height;
|
||||
return stream;
|
||||
|
|
Loading…
Reference in a new issue