Add double for xml node
This commit is contained in:
parent
d2bf17e71a
commit
fa61059ad2
@ -388,6 +388,23 @@ int XMLNode::get(const std::string &attribute, float *value) const
|
||||
return 1;
|
||||
} // get(int)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
int XMLNode::get(const std::string &attribute, double *value) const
|
||||
{
|
||||
std::string s;
|
||||
if (!get(attribute, &s)) return 0;
|
||||
|
||||
if (!StringUtils::parseString<double>(s, value))
|
||||
{
|
||||
Log::warn("[XMLNode]", "WARNING: Expected double but found '%s' for"
|
||||
" attribute '%s' of node '%s' in file %s", s.c_str(),
|
||||
attribute.c_str(), m_name.c_str(), m_file_name.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} // get(int)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
int XMLNode::get(const std::string &attribute, bool *value) const
|
||||
{
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
int get(const std::string &attribute, uint32_t *value) const;
|
||||
int get(const std::string &attribute, int64_t *value) const;
|
||||
int get(const std::string &attribute, float *value) const;
|
||||
int get(const std::string &attribute, double *value) const;
|
||||
int get(const std::string &attribute, bool *value) const;
|
||||
int get(const std::string &attribute, Vec3 *value) const;
|
||||
int get(const std::string &attribute, core::vector2df *value) const;
|
||||
|
Loading…
Reference in New Issue
Block a user