summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-22 20:50:11 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 10:14:03 +0900
commitb4e3d4d8a4f1e0712dbbd309bf4b2f11e36acef1 (patch)
tree34cd568c419c0d845e723a2a14503d055627cc9a /src/lib/eolian_cxx
parent03af836332b6b80975a402c865542fccf2f56de1 (diff)
cxx: Avoid pedantic warning with -Wold-style-cast
This affects the generated headers.
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r--src/lib/eolian_cxx/grammar/base_class_definition.hpp9
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp9
2 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/eolian_cxx/grammar/base_class_definition.hpp b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
index aa61334020..d5fa914b53 100644
--- a/src/lib/eolian_cxx/grammar/base_class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
@@ -64,10 +64,11 @@ struct base_class_definition_generator
64 return false; 64 return false;
65 if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, attributes::unused, context)) return false; 65 if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, attributes::unused, context)) return false;
66 66
67 if(!as_generator 67 if(!as_generator(
68 ( 68 scope_tab << "Eo* _eo_ptr() const { return *(reinterpret_cast<Eo **>"
69 scope_tab << "Eo* _eo_ptr() const { return *(Eo**)this; }\n" 69 << "(const_cast<" << string << " *>(this))); }\n"
70 ).generate(sink, attributes::unused, context)) return false; 70 ).generate(sink, cls.cxx_name, context))
71 return false;
71 72
72 // operator ::ns::Class_Name() const; 73 // operator ::ns::Class_Name() const;
73 // operator ::ns::Class_Name&(); 74 // operator ::ns::Class_Name&();
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 1e21336d9f..30a9daf134 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -128,10 +128,11 @@ struct class_definition_generator
128 return false; 128 return false;
129 if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, attributes::unused, context)) return false; 129 if(!as_generator(";\n" << scope_tab << "}\n").generate(sink, attributes::unused, context)) return false;
130 130
131 if(!as_generator 131 if(!as_generator(
132 ( 132 scope_tab << "Eo* _eo_ptr() const { return *(reinterpret_cast<Eo **>"
133 scope_tab << "Eo* _eo_ptr() const { return *(Eo**)this; }\n" 133 << "(const_cast<" << string << " *>(this))); }\n"
134 ).generate(sink, attributes::unused, context)) return false; 134 ).generate(sink, cls.cxx_name, context))
135 return false;
135 136
136 for (auto&& e : cls.events) 137 for (auto&& e : cls.events)
137 { 138 {