Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 6:31:29 PM (8 years ago)
Author:
landauf
Message:

use only default constructor (with context, but no other arguments)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/Hover.cc

    r11041 r11042  
    7575            //Outer Walls
    7676            for(int i = 0; i<numCells; i++){
    77                 new HoverWall(origin_->getContext(), 0,        i+1,      cellSize, cellHeight, 1);
    78                 new HoverWall(origin_->getContext(), numCells, i+1,      cellSize, cellHeight, 1);
    79                 new HoverWall(origin_->getContext(), i+1,      0,        cellSize, cellHeight, 2);
    80                 new HoverWall(origin_->getContext(), i+1,      numCells, cellSize, cellHeight, 2);
     77                (new HoverWall(origin_->getContext()))->init(0,        i+1,      cellSize, cellHeight, 1);
     78                (new HoverWall(origin_->getContext()))->init(numCells, i+1,      cellSize, cellHeight, 1);
     79                (new HoverWall(origin_->getContext()))->init(i+1,      0,        cellSize, cellHeight, 2);
     80                (new HoverWall(origin_->getContext()))->init(i+1,      numCells, cellSize, cellHeight, 2);
    8181            }
    8282
     
    8585                for(int x=0; x<numCells; x++){
    8686                    switch(levelcode[ y * numCells + x ]){
    87                         case 1: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 1);
     87                        case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
    8888                                break;
    89                         case 3: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 1);
    90                         case 2: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 0);
     89                        case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
     90                        case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0);
    9191                        default: break;
    9292                    }
     
    9696            //Generate 5 flags randomly
    9797            for ( int i = 0; i < 5; i++ )
    98                 flagVector_.push_back(new HoverFlag(origin_->getContext(), rand()%numCells, rand()%numCells, cellSize));
     98            {
     99                HoverFlag* flag = new HoverFlag(origin_->getContext());
     100                flag->init(rand()%numCells, rand()%numCells, cellSize);
     101                flagVector_.push_back(flag);
     102            }
    99103
    100104            flags_ = flagVector_.size();
Note: See TracChangeset for help on using the changeset viewer.