CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <[EMAIL PROTECTED]> 05/03/14 03:40:58

Modified files:
        src            : clipboard.cpp 

Log message:
        fixed compile error on VC++

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/clipboard.cpp.diff?tr1=1.15&tr2=1.16&r1=text&r2=text

Patches:
Index: wesnoth/src/clipboard.cpp
diff -u wesnoth/src/clipboard.cpp:1.15 wesnoth/src/clipboard.cpp:1.16
--- wesnoth/src/clipboard.cpp:1.15      Sat Mar 12 05:04:02 2005
+++ wesnoth/src/clipboard.cpp   Mon Mar 14 03:40:57 2005
@@ -484,12 +484,8 @@
        }
        
        //convert newlines
-       std::string str;
-       while(*buffer != '\0') {
-               if(*buffer != '\r')
-                       str.push_back(*buffer);
-               ++buffer;
-       }
+       std::string str(buffer);
+       str.erase(std::remove(str.begin(),str.end(),'\r'),str.end());
        
        GlobalUnlock(hglb);
        CloseClipboard();


Reply via email to