empty accessor

This commit is contained in:
fluxgen 2004-01-21 13:34:40 +00:00
parent 11a7029b22
commit 5685dc9195
2 changed files with 5 additions and 4 deletions

View file

@ -20,7 +20,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Container.cc,v 1.12 2004/01/14 23:05:14 fluxgen Exp $ // $Id: Container.cc,v 1.13 2004/01/21 13:34:40 fluxgen Exp $
#include "Container.hh" #include "Container.hh"
@ -184,7 +184,7 @@ void Container::exposeEvent(XExposeEvent &event) {
} }
void Container::repositionItems() { void Container::repositionItems() {
if (size() == 0 || m_update_lock) if (empty() || m_update_lock)
return; return;
//!! TODO vertical position //!! TODO vertical position

View file

@ -20,7 +20,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Container.hh,v 1.5 2003/12/23 01:55:07 rathnor Exp $ // $Id: Container.hh,v 1.6 2004/01/21 13:34:40 fluxgen Exp $
#ifndef CONTAINER_HH #ifndef CONTAINER_HH
#define CONTAINER_HH #define CONTAINER_HH
@ -68,10 +68,11 @@ public:
/// accessors /// accessors
inline Alignment alignment() const { return m_align; } inline Alignment alignment() const { return m_align; }
inline int size() const { return m_item_list.size(); } inline int size() const { return m_item_list.size(); }
inline bool empty() const { return m_item_list.empty(); }
inline const Item selected() const { return m_selected; } inline const Item selected() const { return m_selected; }
inline Item selected() { return m_selected; } inline Item selected() { return m_selected; }
unsigned int maxWidthPerClient() const; unsigned int maxWidthPerClient() const;
inline unsigned int maxHeightPerClient() const { return (size() == 0 ? height() : height()/size()); } inline unsigned int maxHeightPerClient() const { return (empty() ? height() : height()/size()); }
inline bool updateLock() const { return m_update_lock; } inline bool updateLock() const { return m_update_lock; }
private: private: