Switched the utf bom checking to putback in the stream (instead of keeping a secondary buffer), which fixes a bug when there's only one ascii character

This commit is contained in:
Jesse Beder
2011-10-20 22:29:41 -05:00
parent e8e5d4bc40
commit 860365b263
2 changed files with 7 additions and 17 deletions

View File

@@ -17,8 +17,6 @@
namespace YAML
{
static const size_t MAX_PARSER_PUSHBACK = 8;
class Stream: private noncopyable
{
public:
@@ -50,8 +48,6 @@ namespace YAML
Mark m_mark;
CharacterSet m_charSet;
unsigned char m_bufPushback[MAX_PARSER_PUSHBACK];
mutable size_t m_nPushedBack;
mutable std::deque<char> m_readahead;
unsigned char* const m_pPrefetched;
mutable size_t m_nPrefetchedAvailable;