cxx: Fix some warnings from -Wextra
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Mon, 23 Sep 2019 16:33:52 +0000 (13:33 -0300)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 23 Sep 2019 21:32:19 +0000 (06:32 +0900)
commitd55cfadf94be406b467a17fda5b51c8953e59b67
treeda1fb34caada4d1d5363e6b1b03772c1d5bbd91f
parenta3394170932d694c94887f130a3ea7ec0d303af4
cxx: Fix some warnings from -Wextra

Summary:
- As we don't have C++17's [[fallthrough]], rely on GCC'd detection
  of fallthrough comments.

  See https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

- Replaced some copy constructors with typecast operators.

  Previously, a constructor with remove_const/remove_cv were used
  to allow const iterators to be constructed from non-const iterators.
  This had the side effect of making these constructors actual copy
  constructors for non const lists. As we did not define other
  special constructors/operators, the rule of 5 were violated for these
  cases.

  This commit replaces these constructors with actual typecast operators
  that promote non const iterators to their const counterparts.

- Cast a Eina_Bool/bool narrowing conversion

- Add a missing break statement from D10050

Reviewers: zmike, brunobelo, felipealmeida

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9934
src/bindings/cxx/eina_cxx/eina_inlist.hh
src/bindings/cxx/eina_cxx/eina_ptrarray.hh
src/bindings/cxx/eina_cxx/eina_ptrlist.hh
src/lib/eolian_cxx/grammar/html_escaped_string.hpp
src/lib/eolian_cxx/grammar/klass_def.hpp