--- lib/Menu.cc.orig 2019-09-24 18:24:46.000000000 -0700 +++ lib/Menu.cc 2019-09-24 18:24:50.000000000 -0700 @@ -365,7 +365,7 @@ } else { index = std::min(static_cast(index), _items.size()); it = _items.begin(); - std::advance(it, index); + std::advance(it, index); } it = _items.insert(it, item); @@ -516,7 +516,7 @@ void bt::Menu::removeIndex(unsigned int index) { ItemList::iterator it = _items.begin(); - std::advance(it, index); + std::advance(it, index); if (it == _items.end()) return; // item not found removeItemByIterator(it); @@ -1037,7 +1037,7 @@ const ItemList::const_iterator &end = _items.end(); ItemList::const_iterator anchor = _items.begin(); if (_active_index != ~0u) { - std::advance(anchor, _active_index); + std::advance(anchor, _active_index); // go one paste the current active index if (anchor != end && !anchor->separator) @@ -1057,8 +1057,7 @@ ItemList::const_reverse_iterator anchor = _items.rbegin(); const ItemList::const_reverse_iterator &end = _items.rend(); if (_active_index != ~0u) { - std::advance - (anchor, _items.size() - _active_index - 1); + std::advance(anchor, _items.size() - _active_index - 1); // go one item past the current active index if (anchor != end && !anchor->separator)