/** Convert a click position to a tab.
* @param c Click position.
- * @param prev Filled in with the previous tab to the click, or 0.
- * @param next Filled in with the next tab after the click, or 0.
+ * @param prev Filled in with the previous tab to the click, or _tabs.end().
+ * @param next Filled in with the next tab after the click, or _tabs.end().
* @return Tab under the click, or 0.
*/
while (i != _tabs.end()) {
if (i->from > c) {
+ *next = i;
break;
}
++i;
}
- if (i != _tabs.end()) {
- *next = i;
-
- if (under) {
- (*next)++;
- }
- }
-
return under;
}