aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-03-11 13:04:33 +0000
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-03-11 13:04:41 +0000
commitc420cbe9f02d134d691402a115c00674b5ba37ae (patch)
treeb5e6511573ac4217bd75ad5d8eadae494602648e
parentRevert "Eo: Change to the Eo4 eo_add syntax." (diff)
downloadefl-c420cbe9f02d134d691402a115c00674b5ba37ae.tar.gz
eolian: refactor database_typedecl_to_str to remove dead code
After the type system transition there was some unnecessary dead code. Fixes CID 1352512.
-rw-r--r--src/lib/eolian/database_type.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index ec3b9a8303..749281b6f6 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -217,27 +217,19 @@ _atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
void
database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf, const char *name)
{
- if (tp->type == EOLIAN_TYPEDECL_ALIAS)
+ switch (tp->type)
{
+ case EOLIAN_TYPEDECL_ALIAS:
_atype_to_str(tp, buf);
- return;
- }
- else if (tp->type == EOLIAN_TYPEDECL_STRUCT
- || tp->type == EOLIAN_TYPEDECL_STRUCT_OPAQUE)
- {
- _stype_to_str(tp, buf, name);
- return;
- }
- else if (tp->type == EOLIAN_TYPEDECL_ENUM)
- {
+ break;
+ case EOLIAN_TYPEDECL_ENUM:
_etype_to_str(tp, buf, name);
- return;
- }
- else
- return;
- if (name)
- {
- eina_strbuf_append_char(buf, ' ');
- eina_strbuf_append(buf, name);
+ break;
+ case EOLIAN_TYPEDECL_STRUCT:
+ case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
+ _stype_to_str(tp, buf, name);
+ break;
+ default:
+ break;
}
}