]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for [ 1066432 ] wxTextOutputStream: endl doesn't work
authorRyan Norton <wxprojects@comcast.net>
Mon, 15 Nov 2004 06:59:44 +0000 (06:59 +0000)
committerRyan Norton <wxprojects@comcast.net>
Mon, 15 Nov 2004 06:59:44 +0000 (06:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/txtstrm.cpp

index 5c53b1f162c76576f5ab1d769cd7ac8b11c0630c..3fc683abd6c15c71a61c2acb69add78a0793c336 100644 (file)
@@ -486,7 +486,16 @@ wxTextOutputStream& wxTextOutputStream::operator<<(float f)
 
 wxTextOutputStream &endl( wxTextOutputStream &stream )
 {
 
 wxTextOutputStream &endl( wxTextOutputStream &stream )
 {
+    //RN: Normally a single char on builds without a real
+    //wchar_t will call the wxUint16 version, which
+    //is not what we want (will print a 10 numeric value,
+    //not a newline).  Thus, we need to send it
+    //a string in that case instead.
+#if !wxUSE_UNICODE || wxWCHAR_T_IS_REAL_TYPE
     return stream << wxT('\n');
     return stream << wxT('\n');
+#else
+    return stream << wxT("\n");
+#endif
 }
 
 #endif
 }
 
 #endif