[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata entrance_data.cxx,1.2,1
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata entrance_data.cxx,1.2,1.3 |
Date: |
30 Sep 2002 14:20:51 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjsdata
In directory dark:/tmp/cvs-serv4130/worldobjsdata
Modified Files:
entrance_data.cxx
Log Message:
moved xmlNodeListGetString into XMLhelper
Index: entrance_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/entrance_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- entrance_data.cxx 28 Sep 2002 11:52:26 -0000 1.2
+++ entrance_data.cxx 30 Sep 2002 14:20:49 -0000 1.3
@@ -50,9 +50,7 @@
if (XMLhelper::equal_str(cur->name, "type"))
{
- char* name = (char*)xmlNodeListGetString(doc, cur->children, 1);
- type = name;
- xmlFree(name);
+ XMLhelper::node_list_get_string(doc, cur->children, 1, type);
}
else if (XMLhelper::equal_str(cur->name, "owner-id"))
{
@@ -64,22 +62,19 @@
}
else if (XMLhelper::equal_str(cur->name, "release-rate"))
{
- char* release_rate_str = (char*)xmlNodeListGetString(doc,
cur->children, 1);
- release_rate = StringConverter::to_int(release_rate_str);
- xmlFree(release_rate_str);
+ XMLhelper::node_list_get_string(doc, cur->children, 1, release_rate);
}
else if (XMLhelper::equal_str(cur->name, "direction"))
{
- char* direction_str = (char*)xmlNodeListGetString(doc, cur->children,
1);
+ std::string direction_str;
+ XMLhelper::node_list_get_string(doc, cur->children, 1, direction_str);
- if (! strcmp(direction_str, "left"))
+ if (direction_str == "left")
direction = EntranceData::LEFT;
- else if (! strcmp(direction_str, "right"))
+ else if (direction_str == "right")
direction = EntranceData::RIGHT;
- else if (! strcmp(direction_str, "misc"))
+ else if (direction_str == "misc")
direction = EntranceData::MISC;
-
- xmlFree(direction_str);
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata entrance_data.cxx,1.2,1.3,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/particles particle.cxx,1.3,1.4 particle.hxx,1.6,1.7 particle_holder.cxx,1.5,1.6 pingu_particle.cxx,1.3,1.4 pingu_particle.hxx,1.5,1.6 rain_particle.cxx,1.4,1.5 rain_particle.hxx,1.4,1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src plt_xml.cxx,1.9,1.10 screen_manager.cxx,1.17,1.18 xml_helper.cxx,1.19,1.20 xml_helper.hxx,1.13,1.14 xml_plf.cxx,1.27,1.28
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/particles particle.cxx,1.3,1.4 particle.hxx,1.6,1.7 particle_holder.cxx,1.5,1.6 pingu_particle.cxx,1.3,1.4 pingu_particle.hxx,1.5,1.6 rain_particle.cxx,1.4,1.5 rain_particle.hxx,1.4,1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src plt_xml.cxx,1.9,1.10 screen_manager.cxx,1.17,1.18 xml_helper.cxx,1.19,1.20 xml_helper.hxx,1.13,1.14 xml_plf.cxx,1.27,1.28
- Index(es):