summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-04-26 16:30:12 +0000
committeralberth <alberth@openttd.org>2009-04-26 16:30:12 +0000
commit25ac77a612c47645787e7af71f7298d511c480ea (patch)
tree19ab07d774deba3a0d951c04d97cc2fc7b173290 /src/widget_type.h
parente04ddbe0ac4ed41853852c35666c551407c226b4 (diff)
downloadopenttd-25ac77a612c47645787e7af71f7298d511c480ea.tar.xz
(svn r16167) -Codechange: Added empty-ness test to nested widget containers.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index 39ed87c2b..f34be9bf1 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -212,6 +212,9 @@ public:
void Add(NWidgetBase *wid);
void SetPIP(uint8 pip_pre, uint8 pip_inter, uint8 pip_post);
+ /** Return whether the container is empty. */
+ inline bool IsEmpty() { return head == NULL; };
+
protected:
uint8 pip_pre; ///< Amount of space before first widget.
uint8 pip_inter; ///< Amount of space between widgets.