]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tarstrm.cpp
added wxRTTI macros to stream classes (patch 1687073)
[wxWidgets.git] / src / common / tarstrm.cpp
index fb4011cb96aa00a34c4e3b13e81b0b37ed8b23bd..ea0c0d14a8af3b8e5d1cb6e64d3e6c2dfbf76be1 100644 (file)
@@ -133,7 +133,7 @@ public:
 
     bool Read(wxInputStream& in);
     bool Write(wxOutputStream& out);
-    bool WriteField(wxOutputStream& out, int id);
+    inline bool WriteField(wxOutputStream& out, int id);
 
     bool IsAllZeros() const;
     wxUint32 Sum(bool SignedSum = false);
@@ -247,7 +247,7 @@ bool wxTarHeaderBlock::Write(wxOutputStream& out)
     return ok;
 }
 
-bool wxTarHeaderBlock::WriteField(wxOutputStream& out, int id)
+inline bool wxTarHeaderBlock::WriteField(wxOutputStream& out, int id)
 {
     return out.Write(Get(id), Len(id)).LastWrite() == Len(id);
 }
@@ -289,7 +289,10 @@ bool wxTarHeaderBlock::SetPath(const wxString& name, wxMBConv& conv)
         size_t len = name.length();
         wxCharBuffer approx(len);
         for (size_t i = 0; i < len; i++)
-            approx.data()[i] = name[i] & ~0x7F ? '_' : name[i];
+        {
+            wxChar c = name[i];
+            approx.data()[i] = c & ~0x7F ? '_' : c;
+        }
         nameBuf = approx;
     }
 
@@ -1265,7 +1268,7 @@ wxString wxTarOutputStream::PaxHeaderPath(const wxString& format,
         if (end == wxString::npos || end + 1 >= format.length())
             break;
         ret << format.substr(begin, end - begin);
-        switch (format[end + 1]) {
+        switch ( format[end + 1].GetValue() ) {
             case 'd': ret << d; break;
             case 'f': ret << f; break;
             case 'p': ret << wxGetProcessId(); break;