diff --git a/src/bindings/cxx/eina_cxx/eina_inlist.hh b/src/bindings/cxx/eina_cxx/eina_inlist.hh index 0092989cb7..8804034d11 100644 --- a/src/bindings/cxx/eina_cxx/eina_inlist.hh +++ b/src/bindings/cxx/eina_cxx/eina_inlist.hh @@ -101,11 +101,12 @@ struct _inlist_iterator : _list(list), _node(node) {} /** - * @brief Copy constructor. Creates a copy of the given iterator. + * @brief Create a const iterator from this one. * @param other Other iterator. */ - _inlist_iterator(_inlist_iterator::type> const& other) - : _list(other._list), _node(other._node) {} + operator _inlist_iterator() { + return _inlist_iterator{_list, _node}; + } /** * @brief Move the iterator to the next position in the list. diff --git a/src/bindings/cxx/eina_cxx/eina_ptrarray.hh b/src/bindings/cxx/eina_cxx/eina_ptrarray.hh index b5de9d7290..b2f6ef515b 100644 --- a/src/bindings/cxx/eina_cxx/eina_ptrarray.hh +++ b/src/bindings/cxx/eina_cxx/eina_ptrarray.hh @@ -46,9 +46,9 @@ struct _ptr_array_iterator { } - _ptr_array_iterator(_ptr_array_iterator::type> const& other) - : _ptr(other._ptr) + operator _ptr_array_iterator() { + return _ptr_array_iterator{_ptr}; } _ptr_array_iterator& operator++() { diff --git a/src/bindings/cxx/eina_cxx/eina_ptrlist.hh b/src/bindings/cxx/eina_cxx/eina_ptrlist.hh index 03b836ab6f..988658b2fa 100644 --- a/src/bindings/cxx/eina_cxx/eina_ptrlist.hh +++ b/src/bindings/cxx/eina_cxx/eina_ptrlist.hh @@ -62,9 +62,9 @@ struct _ptr_list_iterator : _ptr_list_iterator_base : _ptr_list_iterator_base(list, node) { } - _ptr_list_iterator(_ptr_list_iterator const& other) - : _ptr_list_iterator_base(static_cast<_ptr_list_iterator_base const&>(other)) + operator _ptr_list_iterator() { + return _ptr_list_iterator{_list, _node}; } _ptr_list_iterator& operator++() diff --git a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp index 371afcda24..5bbad79c0f 100644 --- a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp +++ b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp @@ -26,7 +26,8 @@ struct html_escaped_string_generator case '\'': out.append("'"); break; case '<': out.append("<"); break; case '>': out.append(">"); break; - case '\\': if (pos < input.size() - 1) pos++; // Deliberate fallthrough + case '\\': if (pos < input.size() - 1) pos++; + // fall through default: out.append(&input[pos], 1); break; } } diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index b1f6c383a3..a7a01cc243 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -495,7 +495,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni complex.subtypes.push_back({stp , unit , ::eolian_type_c_type_get(stp) - , eolian_type_is_move(stp) + , static_cast(eolian_type_is_move(stp)) , is_by::value}); stp = eolian_type_next_type_get(stp); } @@ -532,6 +532,7 @@ inline void type_def::set(Eolian_Expression_Type eolian_exp_type) break; case EOLIAN_EXPR_STRING: set("string", "const char *"); + break; case EOLIAN_EXPR_BOOL: set("bool", "Eina_Bool"); break;