From 615ceb278fd6df29be0cf1d5b92d4e5c711695d2 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 22 Oct 2014 17:28:40 +0200 Subject: [PATCH] Fix compilation of lp_gen_wrappers. --- tools/genwrappers.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/genwrappers.cc b/tools/genwrappers.cc index 6f5178367..7c17a2554 100644 --- a/tools/genwrappers.cc +++ b/tools/genwrappers.cc @@ -338,8 +338,8 @@ static void parseEnum(Project *proj, XmlNode node){ list::iterator it; int value = 0; for (it=enumValues.begin();it!=enumValues.end();++it){ - XmlNode initializer = (*it).getChild("initializer"); - if (initializer) value=atoi(initializer.getText().c_str()); + string initializer = (*it).getChild("initializer").getText(); + if (initializer!="") value=atoi(initializer.c_str()); ConstField *cf=new ConstField(Type::getType("int"),(*it).getChild("name").getText(),value); cf->setHelp((*it).getChild("detaileddescription").getChild("para").getText()); klass->addConstField(cf);