This commit is contained in:
Phillip 2015-11-13 21:59:17 -08:00
parent 63a58265ef
commit ab86e2195f
2 changed files with 13 additions and 13 deletions

View File

@ -21,7 +21,7 @@ FileReader::FileReader(const std::string& filename, atInt32 cacheSize)
#if _WIN32
m_filename = utility::utf8ToWide(filename);
#else
m_filename = fiename;
m_filename = filename;
#endif
open();
setCacheSize(cacheSize);
@ -29,8 +29,8 @@ FileReader::FileReader(const std::string& filename, atInt32 cacheSize)
FileReader::FileReader(const std::wstring& filename, atInt32 cacheSize)
: m_fileHandle(nullptr),
m_cacheData(nullptr),
m_offset(0)
m_cacheData(nullptr),
m_offset(0)
{
#if _WIN32
m_filename = filename;
@ -88,15 +88,15 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin)
atUint64 oldOff = m_offset;
switch(origin)
{
case SeekOrigin::Begin:
m_offset = pos;
break;
case SeekOrigin::Current:
m_offset += pos;
break;
case SeekOrigin::End:
m_offset = length() - pos;
break;
case SeekOrigin::Begin:
m_offset = pos;
break;
case SeekOrigin::Current:
m_offset += pos;
break;
case SeekOrigin::End:
m_offset = length() - pos;
break;
}
if (m_offset > length())
{

View File

@ -20,7 +20,7 @@ FileWriter::FileWriter(const std::string& filename, bool overwrite)
#if _WIN32
m_filename = utility::utf8ToWide(filename);
#else
m_filename = fiename;
m_filename = filename;
#endif
open(overwrite);
}