Replaced the queue of Token pointers with values.

We were getting memory leaks (as told by the CRT detectors, which I also added), and there's really no reason (as long as we're careful) to use pointers there.
This commit is contained in:
Jesse Beder
2008-07-20 05:02:01 +00:00
parent 2eab1e025e
commit 09d7ab365f
25 changed files with 297 additions and 251 deletions

10
include/crt.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
// for memory leaks
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif // _DEBUG

View File

@@ -1,6 +1,7 @@
#pragma once
#include <exception>
#include <string>
namespace YAML
{
@@ -9,6 +10,7 @@ namespace YAML
public:
ParserException(int line_, int column_, const std::string& msg_)
: line(line_), column(column_), msg(msg_) {}
int line, column;
std::string msg;
};

6
include/yaml.h Normal file
View File

@@ -0,0 +1,6 @@
#pragma once
#include "crt.h"
#include "parser.h"
#include "node.h"
#include "exceptions.h"