forked from mia/Aegisub
A few more tweaks.
Originally committed to SVN as r2074.
This commit is contained in:
parent
939b49b82d
commit
cd7bc441f4
2 changed files with 3 additions and 3 deletions
|
@ -60,8 +60,8 @@ void Controller::LoadFile(const String filename,const String encoding)
|
||||||
{
|
{
|
||||||
const FormatPtr handler = FormatManager::GetFormatFromFilename(filename,true);
|
const FormatPtr handler = FormatManager::GetFormatFromFilename(filename,true);
|
||||||
wxFFileInputStream stream(filename);
|
wxFFileInputStream stream(filename);
|
||||||
wxBufferedInputStream buffer(stream);
|
//wxBufferedInputStream buffer(stream);
|
||||||
model.Load(buffer,handler,encoding);
|
model.Load(stream,handler,encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ void ParseLine(FastBuffer<T> &_buffer,wxInputStream &file,wxString &stringBuffer
|
||||||
// If no line breaks were found, load more data into file
|
// If no line breaks were found, load more data into file
|
||||||
while (newLinePos == -1) {
|
while (newLinePos == -1) {
|
||||||
// Read 2048 bytes
|
// Read 2048 bytes
|
||||||
const size_t readBytes = 2048;
|
const size_t readBytes = 1024;
|
||||||
const size_t read = readBytes/sizeof(T);
|
const size_t read = readBytes/sizeof(T);
|
||||||
size_t oldSize = _buffer.GetSize();
|
size_t oldSize = _buffer.GetSize();
|
||||||
T *ptr = _buffer.GetWritePtr(read);
|
T *ptr = _buffer.GetWritePtr(read);
|
||||||
|
|
Loading…
Reference in a new issue