libsgui: Change Rect default constructor
The current Rect default constructor initializes to all zeroes. Change
it to initialize to an invalid Rect.
Modify all of the existing invocations of the default constructor to
maintain the existing behavior.
Bug 18173359
Change-Id: Ibbad076f1550a94f56d7b1cf5350071f2022e09a
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index 3886f93..6310502 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -32,13 +32,12 @@
typedef ARect::value_type value_type;
static const Rect INVALID_RECT;
+ static const Rect EMPTY_RECT;
// we don't provide copy-ctor and operator= on purpose
// because we want the compiler generated versions
- inline Rect() {
- left = right = top = bottom = 0;
- }
+ inline Rect() : Rect(INVALID_RECT) {}
inline Rect(int32_t w, int32_t h) {
left = top = 0;