[commit] r1576 - trunk/GME/XmlBackEnd

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Oct 3 16:05:33 CDT 2011


Author: ksmyth
Date: Mon Oct  3 16:05:33 2011
New Revision: 1576

Log:
Avoid needless MB2W string conversions

Modified:
   trunk/GME/XmlBackEnd/CoreXmlFile.cpp

Modified: trunk/GME/XmlBackEnd/CoreXmlFile.cpp
==============================================================================
--- trunk/GME/XmlBackEnd/CoreXmlFile.cpp	Mon Oct  3 16:05:23 2011	(r1575)
+++ trunk/GME/XmlBackEnd/CoreXmlFile.cpp	Mon Oct  3 16:05:33 2011	(r1576)
@@ -3697,7 +3697,7 @@
 	COMTHROW( metaobject->get_Token( &metaobj_token));
 
 	// the multiline case?  -----  for details see writeObject()
-	bool          spec_care = metaobj_token == "StrAttr" || metaobj_token == "RegNode" || metaobj_token == "Root";
+	bool          spec_care = metaobj_token == L"StrAttr" || metaobj_token == L"RegNode" || metaobj_token == L"Root";
 	std::string   spec_value;
 
 	// find or create object
@@ -3741,7 +3741,7 @@
 
 		// multiline case?
 		bool spec_value_found = false; // will ensure smooth upgrade from old style xmlbackend
-		bool spec_attr = spec_care && ( attribToken == "StrValue" || attribToken == "RegNodeValue" || attribToken == "Comment");
+		bool spec_attr = spec_care && ( attribToken == L"StrValue" || attribToken == L"RegNodeValue" || attribToken == L"Comment");
 		if( spec_attr)
 		{
 			// the implementation below with getChildNodes() is more tolerant of XML COMMENTs, XML Whitespaces...
@@ -3784,7 +3784,7 @@
 			// use the spec_value only if really found the CDATA node
 			if( spec_attr && spec_value_found) // spec_care is also true
 			{
-				if( attribToken == "Comment")
+				if( attribToken == L"Comment")
 				{
 					const std::string comm_spec = "Comment=";
 					if( 0 == spec_value.find( comm_spec)) // CDATA section looks like this: <![CDATA[Comment=....]]>
@@ -3807,7 +3807,7 @@
 		p.m_attrib = it3->second;
 		p.m_pointedObjGuid = parent->m_guid;
 		pointers.push_back(p);
-	}        
+	}
 
 	// read children
 	DOMNodeList * children = e->getChildNodes();


More information about the gme-commit mailing list