Replaced core::stringc with std::string.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10636 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2012-01-10 22:45:57 +00:00
parent 7f2895d5f6
commit a25fb4a71c
3 changed files with 3 additions and 19 deletions

View File

@@ -179,21 +179,6 @@ int XMLNode::get(const std::string &attribute, std::string *value) const
if(o==m_attributes.end()) return 0;
*value=core::stringc(o->second).c_str();
return 1;
} // get
// ----------------------------------------------------------------------------
/** If 'attribute' was defined, set 'value' to the value of the
* attribute and return 1, otherwise return 0 and do not change value.
* \param attribute Name of the attribute.
* \param value Value of the attribute.
*/
int XMLNode::get(const std::string &attribute, core::stringc *value) const
{
if(m_attributes.size()==0) return 0;
std::map<std::string, core::stringw>::const_iterator o;
o = m_attributes.find(attribute);
if(o==m_attributes.end()) return 0;
*value = core::stringc(o->second).c_str();
return 1;
} // get
// ----------------------------------------------------------------------------
int XMLNode::get(const std::string &attribute, core::stringw *value) const

View File

@@ -78,7 +78,6 @@ public:
const XMLNode *getNode(unsigned int i) const;
unsigned int getNumNodes() const {return m_nodes.size(); }
int get(const std::string &attribute, std::string *value) const;
int get(const std::string &attribute, core::stringc *value) const;
int get(const std::string &attribute, core::stringw *value) const;
int get(const std::string &attribute, int32_t *value) const;
int get(const std::string &attribute, uint32_t *value) const;

View File

@@ -693,7 +693,7 @@ bool Track::loadMainTrack(const XMLNode &root)
}
// some static meshes are conditional
core::stringc condition;
std::string condition;
n->get("if", &condition);
if (condition == "splatting")
{
@@ -701,7 +701,7 @@ bool Track::loadMainTrack(const XMLNode &root)
}
else if (condition.find("trophies") == 0)
{
std::vector<std::string> split = StringUtils::split(std::string(condition.c_str()), ' ');
std::vector<std::string> split = StringUtils::split(condition, ' ');
if (split.size() != 3)
{
fprintf(stderr, "[Track] WARNING: unexpected number of tokens in '%s'\n", condition.c_str());
@@ -739,7 +739,7 @@ bool Track::loadMainTrack(const XMLNode &root)
fprintf(stderr, "[Track] WARNING: unknown condition <%s>\n", condition.c_str());
}
core::stringc neg_condition;
std::string neg_condition;
n->get("ifnot", &neg_condition);
if (neg_condition == "splatting")
{