bool MapParser::parseBrushes(const BBox& worldBounds, Model::BrushList& brushes) { size_t oldSize = brushes.size(); try { Model::Brush* brush = NULL; while ((brush = parseBrush(worldBounds, NULL)) != NULL) brushes.push_back(brush); return !brushes.empty(); } catch (MapParserException e) { Utility::deleteAll(brushes, oldSize); m_tokenizer.reset(); return false; } }
ChangeEditStateCommand* ChangeEditStateCommand::select(Model::MapDocument& document, Model::Brush& brush) { Model::BrushList brushes; brushes.push_back(&brush); return select(document, brushes); }