]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
Added support for frames without borders (such as for
[wxWidgets.git] / include / wx / string.h
index 44d6803a1b5d6edbf970dbc12744e282e95d71df..94ef9cb88eb1e1ecb37d43e6a31e9ddc8f0a6ccf 100644 (file)
@@ -257,10 +257,10 @@ public:
   size_t Len() const { return GetStringData()->nDataLength; }
     /// string contains any characters?
   bool IsEmpty() const { return Len() == 0; }
-    /// reinitialize string (and free data!)
+    /// reinitialize string (and free memory)
   void Empty()
   {
-    if ( GetStringData()->nDataLength != 0 )
+    if ( !IsEmpty() )
       Reinit();
 
     wxASSERT( GetStringData()->nDataLength == 0 );
@@ -556,7 +556,7 @@ public:
     //@{
       /// take nLen chars starting at nPos
       wxString(const wxString& str, size_t nPos, size_t nLen = npos)
-      { 
+      {
         wxASSERT( str.GetStringData()->IsValid() );
         InitWith(str.c_str(), nPos, nLen == npos ? 0 : nLen);
       }
@@ -919,7 +919,17 @@ inline bool operator>=(const char  * s1, const wxString& s2) { return s2.Cmp(s1)
 #ifdef  STD_STRING_COMPATIBILITY
 
 // fwd decl
-class WXDLLEXPORT istream;
+// Known not to work with wxUSE_IOSTREAMH set to 0, so
+// replacing with includes (on advice of ungod@pasdex.com.au)
+// class WXDLLEXPORT istream;
+#if wxUSE_IOSTREAMH
+#include <istream.h>
+#else
+#include <istream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 istream& WXDLLEXPORT operator>>(istream& is, wxString& str);