]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stream.cpp
reverted the fix for Unicode compilation with VC++ as it breaks other ports (and...
[wxWidgets.git] / src / common / stream.cpp
index 9c006b8f7ad4133686cc0fb8dddfc0d6150bc40a..a65c6154d853f77c0693c38b2b5dd3faf25bc74f 100644 (file)
@@ -95,7 +95,14 @@ wxStreamBuffer::wxStreamBuffer(BufMode mode)
 {
     Init();
 
 {
     Init();
 
-    m_stream = new wxStreamBase;
+    wxASSERT_MSG(mode != read_write, wxT("you have to use the other ctor for read_write mode") );
+    if ( mode == read )
+        m_stream = new wxInputStream;
+    else if ( mode == write)
+        m_stream = new wxOutputStream;
+    else
+        m_stream = NULL;
+
     m_mode = mode;
 
     m_flushable = FALSE;
     m_mode = mode;
 
     m_flushable = FALSE;