eliminate GCC warings when -Wimplicit-fallthrough is enabled

This commit is contained in:
Jinhao
2018-08-10 23:35:11 +08:00
parent 9bd6e0a2b0
commit 04e57771a4
7 changed files with 113 additions and 143 deletions

View File

@@ -1,7 +1,7 @@
/*
* A Combox Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -732,7 +732,6 @@ namespace nana
bool call_other_keys = false;
if(drawer_->editable())
{
bool is_move_up = false;
switch(arg.key)
{
case keyboard::os_arrow_left:
@@ -741,9 +740,8 @@ namespace nana
drawer_->editor()->reset_caret();
break;
case keyboard::os_arrow_up:
is_move_up = true;
case keyboard::os_arrow_down:
drawer_->move_items(is_move_up, true);
drawer_->move_items((keyboard::os_arrow_up == arg.key), true);
break;
default:
call_other_keys = true;
@@ -751,15 +749,15 @@ namespace nana
}
else
{
bool is_move_up = false;
switch(arg.key)
{
case keyboard::os_arrow_left:
case keyboard::os_arrow_up:
is_move_up = true;
drawer_->move_items(true, true);
break;
case keyboard::os_arrow_right:
case keyboard::os_arrow_down:
drawer_->move_items(is_move_up, true);
drawer_->move_items(false, true);
break;
default:
call_other_keys = true;