]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
Added background colour again
[wxWidgets.git] / include / wx / string.h
index a13e34a56cdbadc902f9b58e18df3800566a6e6e..e239f8bca782feb06a7159beaa8bed92a7ec2628 100644 (file)
@@ -87,7 +87,7 @@ inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
   return _stricmp(psz1, psz2);
 #elif defined(__BORLANDC__)
   return stricmp(psz1, psz2);
-#elif   defined(__UNIX__) || defined(__unix__) || defined(__GNUWIN32__)
+#elif   defined(__UNIX__) || defined(__GNUWIN32__)
   return strcasecmp(psz1, psz2);
 #else
   // almost all compilers/libraries provide this function (unfortunately under
@@ -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 );
@@ -919,7 +919,18 @@ 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
+// N.B. BC++ doesn't have istream.h, ostream.h
+#include <iostream.h>
+#else
+#include <istream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
+#endif
 
 istream& WXDLLEXPORT operator>>(istream& is, wxString& str);