[android] Rolled back MmapReader to FileReader

This commit is contained in:
Alex Zolotarev 2012-01-12 16:39:37 +03:00 committed by Alex Zolotarev
parent da1adedddf
commit e51c501019
2 changed files with 8 additions and 7 deletions

View file

@ -1,13 +1,13 @@
#pragma once
#include "../std/target_os.hpp"
#ifdef OMIM_OS_WINDOWS
//#ifdef OMIM_OS_WINDOWS
#include "file_reader.hpp"
typedef FileReader BaseZipFileReaderType;
#else
#include "mmap_reader.hpp"
typedef MmapReader BaseZipFileReaderType;
#endif
//#else
// #include "mmap_reader.hpp"
// typedef MmapReader BaseZipFileReaderType;
//#endif
#include "../base/exception.hpp"

View file

@ -1,6 +1,7 @@
#include "platform.hpp"
#include "../coding/mmap_reader.hpp"
#include "../base/logging.hpp"
#include "../coding/zip_reader.hpp"
#include <dirent.h>
@ -23,7 +24,7 @@ bool Platform::IsFileExistsByFullPath(string const & filePath)
ModelReader * Platform::GetReader(string const & file) const
{
if (IsFileExistsByFullPath(m_writableDir + file))
return new MmapReader(ReadPathForFile(file));
return new BaseZipFileReaderType(ReadPathForFile(file));
else
{
ASSERT_EQUAL(file.find("assets/"), string::npos, ("Do not use assets/, only file name"));