From bc7956c7cf99bd57a7a1da96d08c71daa426b8b0 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Thu, 26 Jan 2012 14:20:44 +1300 Subject: [PATCH] Use const overloading on BALMLayout::{X|Y}TabAt(). --- headers/libs/alm/ALMLayout.h | 3 +++ src/libs/alm/ALMLayout.cpp | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/headers/libs/alm/ALMLayout.h b/headers/libs/alm/ALMLayout.h index 5eea243da0..fd6b28cfc3 100644 --- a/headers/libs/alm/ALMLayout.h +++ b/headers/libs/alm/ALMLayout.h @@ -49,7 +49,10 @@ public: int32 CountXTabs() const; int32 CountYTabs() const; XTab* XTabAt(int32 index, bool ordered = false); + XTab* XTabAt(int32 index) const; YTab* YTabAt(int32 index, bool ordered = false); + YTab* YTabAt(int32 index) const; + int32 IndexOf(XTab* tab, bool ordered = false); int32 IndexOf(YTab* tab, bool ordered = false); diff --git a/src/libs/alm/ALMLayout.cpp b/src/libs/alm/ALMLayout.cpp index 1e022acfa7..d4e5754500 100644 --- a/src/libs/alm/ALMLayout.cpp +++ b/src/libs/alm/ALMLayout.cpp @@ -267,6 +267,13 @@ BALMLayout::XTabAt(int32 index, bool ordered) } +XTab* +BALMLayout::XTabAt(int32 index) const +{ + return fXTabList.ItemAt(index); +} + + YTab* BALMLayout::YTabAt(int32 index, bool ordered) { @@ -279,6 +286,13 @@ BALMLayout::YTabAt(int32 index, bool ordered) } +YTab* +BALMLayout::YTabAt(int32 index) const +{ + return fYTabList.ItemAt(index); +} + + int32 BALMLayout::IndexOf(XTab* tab, bool ordered) { @@ -325,6 +339,8 @@ CompareYTabFunc(const YTab* tab1, const YTab* tab2) } + + /** * Adds a new row to the specification that is glued to the given y-tabs. *