Remove unneeded virtual calls

This commit is contained in:
Dmitry-Me 2014-09-29 13:20:29 +04:00
parent f2496f5824
commit 097339a099
1 changed files with 6 additions and 6 deletions

View File

@ -1257,7 +1257,7 @@ const char* XMLElement::Attribute( const char* name, const char* value ) const
const char* XMLElement::GetText() const
{
if ( FirstChild() && FirstChild()->ToText() ) {
return FirstChild()->ToText()->Value();
return FirstChild()->Value();
}
return 0;
}
@ -1317,7 +1317,7 @@ void XMLElement::SetText( double v )
XMLError XMLElement::QueryIntText( int* ival ) const
{
if ( FirstChild() && FirstChild()->ToText() ) {
const char* t = FirstChild()->ToText()->Value();
const char* t = FirstChild()->Value();
if ( XMLUtil::ToInt( t, ival ) ) {
return XML_SUCCESS;
}
@ -1330,7 +1330,7 @@ XMLError XMLElement::QueryIntText( int* ival ) const
XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const
{
if ( FirstChild() && FirstChild()->ToText() ) {
const char* t = FirstChild()->ToText()->Value();
const char* t = FirstChild()->Value();
if ( XMLUtil::ToUnsigned( t, uval ) ) {
return XML_SUCCESS;
}
@ -1343,7 +1343,7 @@ XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const
XMLError XMLElement::QueryBoolText( bool* bval ) const
{
if ( FirstChild() && FirstChild()->ToText() ) {
const char* t = FirstChild()->ToText()->Value();
const char* t = FirstChild()->Value();
if ( XMLUtil::ToBool( t, bval ) ) {
return XML_SUCCESS;
}
@ -1356,7 +1356,7 @@ XMLError XMLElement::QueryBoolText( bool* bval ) const
XMLError XMLElement::QueryDoubleText( double* dval ) const
{
if ( FirstChild() && FirstChild()->ToText() ) {
const char* t = FirstChild()->ToText()->Value();
const char* t = FirstChild()->Value();
if ( XMLUtil::ToDouble( t, dval ) ) {
return XML_SUCCESS;
}
@ -1369,7 +1369,7 @@ XMLError XMLElement::QueryDoubleText( double* dval ) const
XMLError XMLElement::QueryFloatText( float* fval ) const
{
if ( FirstChild() && FirstChild()->ToText() ) {
const char* t = FirstChild()->ToText()->Value();
const char* t = FirstChild()->Value();
if ( XMLUtil::ToFloat( t, fval ) ) {
return XML_SUCCESS;
}