forked from organicmaps/organicmaps-tmp
[coding] Inherit default cache sizes in ZipFileReader from FileReader.
This commit is contained in:
parent
73df2beda7
commit
0fd0375802
3 changed files with 10 additions and 5 deletions
|
@ -15,9 +15,6 @@ using namespace std;
|
|||
|
||||
namespace
|
||||
{
|
||||
uint32_t const kDefaultLogPageSize = 10;
|
||||
uint32_t const kDefaultLogPageCount = 4;
|
||||
|
||||
class FileDataWithCachedSize : public my::FileData
|
||||
{
|
||||
using base_t = my::FileData;
|
||||
|
@ -35,6 +32,11 @@ private:
|
|||
};
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
uint32_t const FileReader::kDefaultLogPageSize = 10;
|
||||
// static
|
||||
uint32_t const FileReader::kDefaultLogPageCount = 4;
|
||||
|
||||
class FileReader::FileReaderData
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
class FileReader : public ModelReader
|
||||
{
|
||||
public:
|
||||
static uint32_t const kDefaultLogPageSize;
|
||||
static uint32_t const kDefaultLogPageCount;
|
||||
|
||||
explicit FileReader(std::string const & fileName);
|
||||
FileReader(std::string const & fileName, uint32_t logPageSize, uint32_t logPageCount);
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ public:
|
|||
DECLARE_EXCEPTION(LocateZipException, OpenException);
|
||||
DECLARE_EXCEPTION(InvalidZipException, OpenException);
|
||||
|
||||
/// @param[in] logPageSize, logPageCount default values are equal with FileReader constructor.
|
||||
ZipFileReader(string const & container, string const & file,
|
||||
uint32_t logPageSize = 10, uint32_t logPageCount = 4);
|
||||
uint32_t logPageSize = FileReader::kDefaultLogPageSize,
|
||||
uint32_t logPageCount = FileReader::kDefaultLogPageCount);
|
||||
|
||||
/// @note Size() returns compressed file size inside zip
|
||||
uint64_t UncompressedSize() const { return m_uncompressedFileSize; }
|
||||
|
|
Loading…
Add table
Reference in a new issue