mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Switched to reading the entire file into a buffer at the start.\nThis speeds it up a TON (like 100x).
This commit is contained in:
@@ -32,7 +32,7 @@ namespace YAML
|
||||
// and saves it on a stack.
|
||||
void Scanner::InsertSimpleKey()
|
||||
{
|
||||
SimpleKey key(INPUT.pos(), INPUT.line, INPUT.column, m_flowLevel);
|
||||
SimpleKey key(INPUT.pos, INPUT.line, INPUT.column, m_flowLevel);
|
||||
|
||||
// first add a map start, if necessary
|
||||
key.pMapStart = PushIndentTo(INPUT.column, false);
|
||||
@@ -78,7 +78,7 @@ namespace YAML
|
||||
isValid = false;
|
||||
|
||||
// also needs to be less than 1024 characters and inline
|
||||
if(INPUT.line != key.line || INPUT.pos() - key.pos > 1024)
|
||||
if(INPUT.line != key.line || INPUT.pos - key.pos > 1024)
|
||||
isValid = false;
|
||||
|
||||
// invalidate key
|
||||
|
Reference in New Issue
Block a user