Attempted to fix partial conversion bug
This commit is contained in:
@@ -25,12 +25,7 @@ void write(const std::vector<std::string> &,
|
||||
void (*f) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
EntityConverter &);
|
||||
|
||||
void parse_prefab(std::ifstream &,
|
||||
std::ofstream &,
|
||||
void (*f) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
std::vector<std::vector<std::string> > &);
|
||||
|
||||
bool convertmap(const char * const,
|
||||
bool convertmap(std::stringstream &,
|
||||
const char * const,
|
||||
void (*f) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
std::vector<std::vector<std::string> > &);
|
||||
@@ -180,4 +175,19 @@ using namespace std;
|
||||
return output;
|
||||
}
|
||||
|
||||
#endif
|
||||
template <class ISTR>
|
||||
void parse_prefab(ISTR &f,
|
||||
std::ofstream &out,
|
||||
void (*b) (std::stringstream &, const std::vector<TPlanePoints> &),
|
||||
std::vector<std::vector<std::string> > &entities) {
|
||||
using namespace std;
|
||||
string l;
|
||||
getline(f, l);
|
||||
if (l.find(KEYWORD_BRUSH) != string::npos) {
|
||||
write(parse_brush<ISTR>(f), out, b);
|
||||
} else if (l.find(KEYWORD_ENTITY) != string::npos) {
|
||||
entities.push_back(get_entity<ISTR>(f));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user