mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Rect: Comment about a bad API method.
In retrospect, I don't like Rect + Rect = union -- it doesn't make as much sense and isn't as readable as Rect.union(Rect).
This commit is contained in:
parent
f722497b01
commit
df0fc30fda
@ -42,6 +42,8 @@ Rect Rect::intersect(const Rect& o) const {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This violates the principle of least surprise!
|
||||
// This does a union, but that might not be obvious from "+=" syntax.
|
||||
Rect& Rect::operator+=(const Rect& p) {
|
||||
if( is_empty() ) {
|
||||
*this = p;
|
||||
|
Loading…
Reference in New Issue
Block a user