wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src/serialization string_utils.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src/serialization string_utils.cpp
Date: Mon, 07 Mar 2005 21:30:07 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/03/08 02:30:07

Modified files:
        src/serialization: string_utils.cpp 

Log message:
        fixed compilation problems on VC++

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/string_utils.cpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: wesnoth/src/serialization/string_utils.cpp
diff -u wesnoth/src/serialization/string_utils.cpp:1.7 
wesnoth/src/serialization/string_utils.cpp:1.8
--- wesnoth/src/serialization/string_utils.cpp:1.7      Sun Mar  6 18:12:19 2005
+++ wesnoth/src/serialization/string_utils.cpp  Tue Mar  8 02:30:06 2005
@@ -1,4 +1,4 @@
-/* $Id: string_utils.cpp,v 1.7 2005/03/06 18:12:19 ydirson Exp $ */
+/* $Id: string_utils.cpp,v 1.8 2005/03/08 02:30:06 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Copyright (C) 2005 by Guillaume Melquiond <address@hidden>
@@ -472,10 +472,16 @@
 {
        wide_string res;
        
-       try {
-               res.insert(res.end(), utf8_iterator(src), 
utf8_iterator::end(src));
+       try {
+               utf8_iterator i1(src);
+               const utf8_iterator i2(utf8_iterator::end(src));
+
+               //equivalent to res.insert(res.end(),i1,i2) which doesn't work 
on VC++6.
+               while(i1 != i2) {
+                       push_back(res,*i1);
+                       ++i1;
+               }
        }
-
        catch(invalid_utf8_exception e) {
                ERR_GENERAL << "Invalid UTF-8 string: \"" << src << "\"\n";
                return res;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]