[sword-cvs] sword/src/utilfuns utilxml.cpp,1.17,1.18

sword at www.crosswire.org sword at www.crosswire.org
Wed May 19 15:03:38 MST 2004


Committed by: joachim

Update of /cvs/core/sword/src/utilfuns
In directory www:/tmp/cvs-serv5024/src/utilfuns

Modified Files:
	utilxml.cpp 
Log Message:
 assignments shouldn't be left out :) 

Index: utilxml.cpp
===================================================================
RCS file: /cvs/core/sword/src/utilfuns/utilxml.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- utilxml.cpp	16 May 2004 20:59:05 -0000	1.17
+++ utilxml.cpp	19 May 2004 22:03:36 -0000	1.18
@@ -181,7 +181,8 @@
 
 	const char *retVal = 0;
 	if (it != attributes.end()) 
-		it->second.c_str();
+		retVal = it->second.c_str();		
+		
 	if ((retVal) && (partNum > -1))
 		retVal = getPart(retVal, partNum, partSplit);
 
@@ -204,17 +205,22 @@
 		parse();
 
 	if (isEndTag())
-		tag += "/";
+		tag.append('/');
 
-	tag += getName();
+	tag.append(getName());
 	for (StringPairMap::iterator it = attributes.begin(); it != attributes.end(); it++) {
-		tag.appendFormatted(" %s=\"%s\"", it->first.c_str(), it->second.c_str());
+		//tag.appendFormatted(" %s=\"%s\"", it->first.c_str(), it->second.c_str());
+		tag.append(' ');
+		tag.append(it->first.c_str());
+		tag.append("=\"");
+		tag.append(it->second.c_str());
+		tag.append('"');
 	}
 
 	if (isEmpty())
-		tag += "/";
+		tag.append('/');
 
-	tag += ">";
+	tag.append('>');
 
 
 	if (buf)



More information about the sword-cvs mailing list