all repos — fluxbox @ 05cec54a399f8b5fde81f04bfc30f60fa4e8afe3

custom fork of the fluxbox windowmanager

Added getLast function
fluxgen fluxgen
commit

05cec54a399f8b5fde81f04bfc30f60fa4e8afe3

parent

1982b853b5e14f4fc67c1cede269b8f1441249ed

1 files changed, 19 insertions(+), 3 deletions(-)

jump to
M src/Tab.ccsrc/Tab.cc

@@ -769,10 +769,26 @@ // Returns the first Tab in the chain

// of currentchain. //----------------------------------- Tab *Tab::getFirst(Tab *current) { - if (current==0) + if (!current) return 0; - for (; current->m_prev != 0; current = current->m_prev); - return current; + + Tab *i=current; + + for (; i->m_prev != 0; i = i->m_prev); + return i; +} + +//-------------- getFirst() --------- +// Returns the first Tab in the chain +// of currentchain. +//----------------------------------- +Tab *Tab::getLast(Tab *current) { + if (!current) + return 0; + Tab *i=current; + + for (; i->m_next != 0; i = i->m_next); + return i; } //-------------- insert ------------