Fix errors on msvc.

This commit is contained in:
vng 2010-12-19 23:21:28 +02:00 committed by Alex Zolotarev
parent c79478193b
commit 94386697d7
4 changed files with 13 additions and 8 deletions

View file

@ -1,14 +1,19 @@
#include "../base/SRC_FIRST.hpp"
// it's a shit; remove this into coding folder
#include "../coding/internal/file64_api.hpp"
#include "memory_mapped_file.hpp"
MemoryMappedFile::MemoryMappedFile(char const * fileName, bool isReadOnly)
: m_isReadOnly(isReadOnly)
{
#ifdef OMIM_OS_WINDOWS_NATIVE
m_fp = fopen(name, isReadOnly ? "r" : "w");
fseek(m_fp, SEEK_END);
m_fp = fopen(fileName, isReadOnly ? "r" : "w");
fseek(m_fp, 0, SEEK_END);
m_size = ftell(m_fp);
fseek(m_fp, SEEK_SET);
fseek(m_fp, 0, SEEK_SET);
m_data = malloc(m_size);
fread(m_data, 1, m_size, m_fp);

View file

@ -13,21 +13,21 @@
class MemoryMappedFile
{
private:
bool m_isReadOnly;
#ifdef OMIM_OS_WINDOWS_NATIVE
FILE * m_fp;
#else
int m_fd;
#endif
void * m_data;
size_t m_size;
#endif
public:
MemoryMappedFile(char const * fileName, bool isReadOnly);
~MemoryMappedFile();
void * data();
size_t size() const;
};

View file

@ -76,7 +76,7 @@ namespace yg
}
FT_Glyph glyph = 0;
FTC_Node glyphNode;
//FTC_Node glyphNode;
if (key.m_isMask)
FTCHECK(FTC_ImageCache_LookupScaler(

View file

@ -29,7 +29,7 @@ namespace yg
bool operator<(GlyphKey const & l, GlyphKey const & r);
class GlyphCacheImpl;
struct GlyphCacheImpl;
class GlyphCache
{