Changed output queue to vector
This commit is contained in:
@@ -103,20 +103,20 @@ vector<string> get_entity(ifstream &f) {
|
||||
void parse_prefab(ifstream &f,
|
||||
ofstream &out,
|
||||
void (*b) (stringstream &, const vector<TPlanePoints> &),
|
||||
queue<vector<string> > &entities) {
|
||||
vector<vector<string> > &entities) {
|
||||
string l;
|
||||
getline(f, l);
|
||||
if (l.find(KEYWORD_BRUSH) != string::npos) {
|
||||
write(parse_brush<ifstream>(f), out, b);
|
||||
} else if (l.find(KEYWORD_ENTITY) != string::npos) {
|
||||
entities.push(get_entity(f));
|
||||
entities.push_back(get_entity(f));
|
||||
}
|
||||
}
|
||||
|
||||
bool convertmap(const char * const infile,
|
||||
const char * const outfile,
|
||||
void (*brushdef) (stringstream &, const vector<TPlanePoints> &),
|
||||
queue<vector<string> > &entities) {
|
||||
vector<vector<string> > &entities) {
|
||||
ifstream fin;
|
||||
fin.open(infile);
|
||||
if (!fin.good()){
|
||||
@@ -137,7 +137,7 @@ bool convertmap(const char * const infile,
|
||||
line.find(KEYWORD_GLOBAL) != string::npos) {
|
||||
parse_prefab(fin, fout, brushdef, entities);
|
||||
} else if (line.find(KEYWORD_ENTITY) != string::npos) {
|
||||
entities.push(get_entity(fin));
|
||||
entities.push_back(get_entity(fin));
|
||||
} else if (line.find(KEYWORD_BRUSH) != string::npos) {
|
||||
write(parse_brush<ifstream>(fin), fout, brushdef);
|
||||
}
|
||||
|
@@ -26,12 +26,12 @@ std::vector<std::string> get_entity(std::ifstream &);
|
||||
void parse_prefab(std::ifstream &,
|
||||
std::ofstream &,
|
||||
void (*f) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
std::queue<std::vector<std::string> > &);
|
||||
std::vector<std::vector<std::string> > &);
|
||||
|
||||
bool convertmap(const char * const,
|
||||
const char * const,
|
||||
void (*f) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
std::queue<std::vector<std::string> > &);
|
||||
std::vector<std::vector<std::string> > &);
|
||||
|
||||
#define KEYWORD_ENTITY "entity"
|
||||
#define KEYWORD_BRUSH "brush"
|
||||
|
Reference in New Issue
Block a user