コード例 #1
0
 void SnapshotCommand::restoreSnapshots(const Model::BrushList& brushes) {
     assert(m_brushes.size() == brushes.size());
     
     for (unsigned int i = 0; i < brushes.size(); i++) {
         Model::Brush& brush = *brushes[i];
         BrushSnapshot& snapshot = *m_brushes[brush.uniqueId()];
         snapshot.restore(brush);
     }
 }
コード例 #2
0
ファイル: MapParser.cpp プロジェクト: rebb/TrenchBroom
 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;
     }
 }
コード例 #3
0
 void SnapshotCommand::makeSnapshots(const Model::BrushList& brushes) {
     for (unsigned int i = 0; i < brushes.size(); i++) {
         Model::Brush& brush = *brushes[i];
         m_brushes[brush.uniqueId()] = new BrushSnapshot(brush);
     }
 }