File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ namespace zim
107107 bool hasChecksum () const { return getMimeListPos () >= 80 ; }
108108 offset_type getChecksumPos () const { return hasChecksum () ? checksumPos : 0 ; }
109109 void setChecksumPos (offset_type p) { checksumPos = p; }
110+
111+ bool useNewNamespaceScheme () const { return minorVersion >= 1 ; }
112+
110113 };
111114
112115}
Original file line number Diff line number Diff line change @@ -186,7 +186,6 @@ class Grouping
186186 zimReader (makeFileReader (zimFile)),
187187 direntReader (new DirentReader (zimReader)),
188188 clusterCache (envValue (" ZIM_CLUSTERCACHE" , CLUSTER_CACHE_SIZE)),
189- m_newNamespaceScheme (false ),
190189 m_hasFrontArticlesIndex (true ),
191190 m_startUserEntry (0 ),
192191 m_endUserEntry (0 )
@@ -366,8 +365,7 @@ class Grouping
366365 p = zp+1 ;
367366 }
368367
369- const_cast <bool &>(m_newNamespaceScheme) = header.getMinorVersion () >= 1 ;
370- if (m_newNamespaceScheme) {
368+ if (header.useNewNamespaceScheme ()) {
371369 const_cast <entry_index_t &>(m_startUserEntry) = getNamespaceBeginOffset (' C' );
372370 const_cast <entry_index_t &>(m_endUserEntry) = getNamespaceEndOffset (' C' );
373371 } else {
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ namespace zim
5656 typedef std::shared_ptr<const Cluster> ClusterHandle;
5757 ConcurrentCache<cluster_index_type, ClusterHandle> clusterCache;
5858
59- const bool m_newNamespaceScheme;
6059 const bool m_hasFrontArticlesIndex;
6160 const entry_index_t m_startUserEntry;
6261 const entry_index_t m_endUserEntry;
@@ -109,7 +108,7 @@ namespace zim
109108 const std::string& getFilename () const { return zimFile->filename (); }
110109 const Fileheader& getFileheader () const { return header; }
111110 zsize_t getFilesize () const ;
112- bool hasNewNamespaceScheme () const { return m_newNamespaceScheme ; }
111+ bool hasNewNamespaceScheme () const { return header. useNewNamespaceScheme () ; }
113112 bool hasFrontArticlesIndex () const { return m_hasFrontArticlesIndex; }
114113
115114 FileCompound::PartRange getFileParts (offset_t offset, zsize_t size);
You can’t perform that action at this time.
0 commit comments