summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-05-29 18:13:53 +0000
committerCedric BAIL <cedric.bail@free.fr>2019-05-29 11:26:47 -0700
commitbf1d2d86e478151f4d88cea098502bdfa19064b5 (patch)
tree11f43602950b8a6e26b1edf9742f8dbd6652324c
parentc96c9a5b83930b855ce0c42db60826a4379c1cb6 (diff)
eolian-cxx: Fix some warnings from cppcheck
Differential Revision: https://phab.enlightenment.org/D9052
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index c11aba44ed..d03d52da76 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -122,8 +122,8 @@ enum class variable_type
122 122
123 123
124struct type_def; 124struct type_def;
125bool operator==(type_def const& rhs, type_def const& lhs); 125bool operator==(type_def const& lhs, type_def const& rhs);
126bool operator!=(type_def const& rhs, type_def const& lhs); 126bool operator!=(type_def const& lhs, type_def const& rhs);
127 127
128enum class class_type 128enum class class_type
129{ 129{
@@ -377,8 +377,8 @@ struct type_def
377 bool is_beta; 377 bool is_beta;
378 378
379 type_def() = default; 379 type_def() = default;
380 type_def(variant_type original_type, std::string c_type, bool has_own) 380 type_def(variant_type original_type, std::string c_type, bool has_own, bool is_ptr, bool is_beta)
381 : original_type(original_type), c_type(c_type), has_own(has_own) {} 381 : original_type(original_type), c_type(c_type), has_own(has_own), is_ptr(is_ptr), is_beta(is_beta) {}
382 382
383 type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype) 383 type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype)
384 { 384 {
@@ -422,7 +422,7 @@ inline bool operator!=(type_def const& lhs, type_def const& rhs)
422 return !(lhs == rhs); 422 return !(lhs == rhs);
423} 423}
424 424
425type_def const void_ {attributes::regular_type_def{"void", {qualifier_info::is_none, {}}, {}}, "void", false}; 425type_def const void_ {attributes::regular_type_def{"void", {qualifier_info::is_none, {}}, {}}, "void", false, false, false};
426 426
427inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype) 427inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype)
428{ 428{
@@ -699,6 +699,7 @@ struct function_def
699 function_type _type, 699 function_type _type,
700 bool _is_beta = false, 700 bool _is_beta = false,
701 bool _is_protected = false, 701 bool _is_protected = false,
702 bool _is_static = false,
702 Eolian_Unit const* unit = nullptr) 703 Eolian_Unit const* unit = nullptr)
703 : klass(_klass), return_type(_return_type), name(_name), 704 : klass(_klass), return_type(_return_type), name(_name),
704 parameters(_parameters), c_name(_c_name), filename(_filename), 705 parameters(_parameters), c_name(_c_name), filename(_filename),
@@ -708,6 +709,7 @@ struct function_def
708 property_documentation(_property_documentation), 709 property_documentation(_property_documentation),
709 type(_type), 710 type(_type),
710 is_beta(_is_beta), is_protected(_is_protected), 711 is_beta(_is_beta), is_protected(_is_protected),
712 is_static(_is_static),
711 unit(unit) {} 713 unit(unit) {}
712 714
713 function_def( ::Eolian_Function const* function, Eolian_Function_Type type, Eolian_Typedecl const* tp, Eolian_Unit const* unit) 715 function_def( ::Eolian_Function const* function, Eolian_Function_Type type, Eolian_Typedecl const* tp, Eolian_Unit const* unit)
@@ -1191,7 +1193,7 @@ struct klass_def
1191 { 1193 {
1192 return lhs.eolian_name == rhs.eolian_name 1194 return lhs.eolian_name == rhs.eolian_name
1193 && lhs.cxx_name == rhs.cxx_name 1195 && lhs.cxx_name == rhs.cxx_name
1194 && lhs.filename == lhs.filename 1196 && lhs.filename == rhs.filename
1195 && lhs.namespaces == rhs.namespaces 1197 && lhs.namespaces == rhs.namespaces
1196 && lhs.functions == rhs.functions 1198 && lhs.functions == rhs.functions
1197 && lhs.properties == rhs.properties 1199 && lhs.properties == rhs.properties
@@ -1223,7 +1225,8 @@ struct klass_def
1223 , class_type type 1225 , class_type type
1224 , std::set<klass_name, compare_klass_name_by_name> immediate_inherits 1226 , std::set<klass_name, compare_klass_name_by_name> immediate_inherits
1225 , std::string klass_get_name 1227 , std::string klass_get_name
1226 , bool is_beta) 1228 , bool is_beta
1229 , Eolian_Unit const* unit)
1227 : eolian_name(eolian_name), cxx_name(cxx_name), filename(filename) 1230 : eolian_name(eolian_name), cxx_name(cxx_name), filename(filename)
1228 , documentation(documentation) 1231 , documentation(documentation)
1229 , namespaces(namespaces) 1232 , namespaces(namespaces)
@@ -1231,6 +1234,7 @@ struct klass_def
1231 , immediate_inherits(immediate_inherits) 1234 , immediate_inherits(immediate_inherits)
1232 , klass_get_name(klass_get_name) 1235 , klass_get_name(klass_get_name)
1233 , is_beta(is_beta) 1236 , is_beta(is_beta)
1237 , unit(unit)
1234 {} 1238 {}
1235 klass_def(std::string _eolian_name, std::string _cxx_name 1239 klass_def(std::string _eolian_name, std::string _cxx_name
1236 , std::vector<std::string> _namespaces 1240 , std::vector<std::string> _namespaces