]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tarstrm.cpp
Minor header cleaning.
[wxWidgets.git] / src / common / tarstrm.cpp
index f3a1cec17a55214ce8ab5768d844c0c69d811f43..ea47b5bc1fb07d3fb3541677c7514d674c7f0b19 100644 (file)
@@ -19,7 +19,6 @@
 #include "wx/tarstrm.h"
 
 #ifndef WX_PRECOMP
-    #include "wx/hashmap.h"
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/utils.h"
@@ -62,7 +61,7 @@ enum {
 };
 
 enum {
-    TAR_BLOCKSIZE = 512,
+    TAR_BLOCKSIZE = 512
 };
 
 // checksum type
@@ -109,10 +108,10 @@ wxTarClassFactory::GetProtocols(wxStreamProtocolType type) const
     static const wxChar *empty[]     = { NULL };
 
     switch (type) {
-        case wxSTREAM_PROTOCOL:         return protocols;
-        case wxSTREAM_MIMETYPE:         return mimetypes;
-        case wxSTREAM_FILEEXTENSION:    return fileexts;
-        default:                        return empty;
+        case wxSTREAM_PROTOCOL: return protocols;
+        case wxSTREAM_MIMETYPE: return mimetypes;
+        case wxSTREAM_FILEEXT:  return fileexts;
+        default:                return empty;
     }
 }
 
@@ -155,7 +154,7 @@ private:
     static void check();
 };
 
-wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock);
+wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock)
 
 // A table giving the field names and offsets in a tar header block
 const wxTarField wxTarHeaderBlock::fields[] =
@@ -182,10 +181,12 @@ const wxTarField wxTarHeaderBlock::fields[] =
 
 void wxTarHeaderBlock::check()
 {
+#if 0
     wxCOMPILE_TIME_ASSERT(
         WXSIZEOF(fields) == TAR_NUMFIELDS + 1,
         Wrong_number_of_elements_in_fields_table
     );
+#endif
 }
 
 bool wxTarHeaderBlock::IsAllZeros() const
@@ -528,14 +529,14 @@ wxString wxTarEntry::GetInternalName(const wxString& name,
 
 bool wxTarEntry::IsDir() const
 {
-    return m_TypeFlag - wxTAR_DIRTYPE == 0;
+    return m_TypeFlag == wxTAR_DIRTYPE;
 }
 
 void wxTarEntry::SetIsDir(bool isDir)
 {
     if (isDir)
         m_TypeFlag = wxTAR_DIRTYPE;
-    else if (m_TypeFlag - wxTAR_DIRTYPE == 0)
+    else if (m_TypeFlag == wxTAR_DIRTYPE)
         m_TypeFlag = wxTAR_REGTYPE;
 }
 
@@ -569,8 +570,6 @@ void wxTarEntry::SetMode(int mode)
 wxDECLARE_SCOPED_PTR(wxTarEntry, wxTarEntryPtr_)
 wxDEFINE_SCOPED_PTR (wxTarEntry, wxTarEntryPtr_)
 
-WX_DECLARE_STRING_HASH_MAP(wxString, wxTarHeaderRecords);
-
 wxTarInputStream::wxTarInputStream(wxInputStream& stream,
                                    wxMBConv& conv /*=wxConvLocal*/)
  :  wxArchiveInputStream(stream, conv)