mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 15:20:31 -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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue