lint: constant conditional operator

This commit is contained in:
Kurtis Rader
2016-11-01 21:19:34 -07:00
parent 71e69b6d75
commit f6047f02d6
12 changed files with 31 additions and 44 deletions

View File

@@ -615,7 +615,7 @@ bool pager_t::select_next_completion_in_direction(selection_direction_t directio
return false;
}
default: {
assert(0 && "Unhandled selection_direction_t constant");
DIE("unhandled selection_direction_t constant");
abort();
}
}
@@ -639,7 +639,7 @@ bool pager_t::select_next_completion_in_direction(selection_direction_t directio
new_selected_completion_idx = selected_completion_idx - 1;
}
} else {
assert(0 && "Unknown non-cardinal direction");
DIE("unknown non-cardinal direction");
}
} else {
// Cardinal directions. We have a completion index; we wish to compute its row and column.
@@ -711,8 +711,8 @@ bool pager_t::select_next_completion_in_direction(selection_direction_t directio
break;
}
default: {
assert(0 && "Unknown cardinal direction");
break;
DIE("unknown cardinal direction");
abort();
}
}