Eliminate repeated virtual calls
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 0e1386d..9688e5d 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -913,7 +913,8 @@
 

 bool XMLText::ShallowEqual( const XMLNode* compare ) const

 {

-    return ( compare->ToText() && XMLUtil::StringEqual( compare->ToText()->Value(), Value() ));

+    const XMLText* text = compare->ToText();

+    return ( text && XMLUtil::StringEqual( text->Value(), Value() ) );

 }