diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-22 09:55:44 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-22 09:55:44 +0200 |
commit | 6b6f00e03a1e6b9309699ae5ff603dbb79af7856 (patch) | |
tree | eef74312ddc2c21142e48e7ffa9ae55170bae955 /src/lib | |
parent | c6feab5f512dc266f4d5eeda45b370ee8af5922c (diff) | |
download | edoors-6b6f00e03a1e6b9309699ae5ff603dbb79af7856.zip edoors-6b6f00e03a1e6b9309699ae5ff603dbb79af7856.tar.gz |
eiotas_room_add: uses INIT_IOTA and ADD_TO_PARENT macros
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/eiotas_room.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/lib/eiotas_room.c b/src/lib/eiotas_room.c index 9ea9e10..92f6a67 100644 --- a/src/lib/eiotas_room.c +++ b/src/lib/eiotas_room.c @@ -29,16 +29,9 @@ EAPI Eiotas_Room* eiotas_room_add(const char* name, Eiotas_Room *parent) BUILD_INSTANCE(Eiotas_Room,room); - if(eiotas_iota_init(&room->iota,name,parent,EIOTAS_TYPE_ROOM)) { - return NULL; - } - - if(eina_hash_find(parent->children,room->iota.name)) { - ERR("Room %s already exists in %s",name,parent->iota.path); - eiotas_iota_desinit(&room->iota); - return NULL; - } - eina_hash_direct_add(parent->children,room->iota.name,room); + INIT_IOTA(&room->iota,name,parent,EIOTAS_TYPE_ROOM); + + ADD_TO_PARENT(parent,(&room->iota),"Room") room->links = NULL; // TODO room->children = eina_hash_stringshared_new((Eina_Free_Cb)&eiotas_iota_free); |