Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/overlays/stats/CreateLines.cc

    r6502 r11071  
    3737    CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height)
    3838    {
    39         playerNameText_ = new OverlayText(0);
     39        playerNameText_ = new OverlayText(nullptr);
    4040        playerNameText_->setTextSize(0.04f);
    4141        playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
    4242        playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f));
    4343
    44         scoreText_ = new OverlayText(0);
     44        scoreText_ = new OverlayText(nullptr);
    4545        scoreText_->setTextSize(0.04f);
    4646        scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
    4747        scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f));
    4848
    49         deathsText_ = new OverlayText(0);
     49        deathsText_ = new OverlayText(nullptr);
    5050        deathsText_->setTextSize(0.04f);
    5151        deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f));
    5252        deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f));
    5353
    54         background_ = new Stats(0);
     54        background_ = new Stats(nullptr);
    5555        background_->setPosition(Vector2(leftOffset, topOffset));
    5656        background_->setSize(Vector2(width, height));
  • code/trunk/src/modules/overlays/stats/CreateLines.h

    r5980 r11071  
    2929
    3030#include "overlays/OverlaysPrereqs.h"
     31
     32#include <string>
    3133
    3234namespace orxonox
  • code/trunk/src/modules/overlays/stats/Scoreboard.cc

    r9667 r11071  
    6060        SUPER(Scoreboard, changedVisibility);
    6161
    62         for (unsigned int i = 0; i < this->lines_.size(); ++i)
    63             this->lines_[i]->changedVisibility();
     62        for (CreateLines* line : this->lines_)
     63            line->changedVisibility();
    6464    }
    6565
     
    9494
    9595        unsigned int index = 0;
    96         for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
     96        for (const auto& mapEntry : playerList)
    9797        {
    98             this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
    99             this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
    100             this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
     98            this->lines_[index]->setPlayerName(multi_cast<std::string>(mapEntry.first->getName()));
     99            this->lines_[index]->setScore(multi_cast<std::string>(mapEntry.second.frags_));
     100            this->lines_[index]->setDeaths(multi_cast<std::string>(mapEntry.second.killed_));
    101101            index++;
    102102        }
  • code/trunk/src/modules/overlays/stats/Scoreboard.h

    r9667 r11071  
    4444        virtual ~Scoreboard();
    4545
    46         virtual void tick(float dt);
     46        virtual void tick(float dt) override;
    4747
    4848        inline void setCreateLines(CreateLines* cl)
     
    5151            { return this->createlines_; }
    5252
    53         virtual void changedVisibility();
     53        virtual void changedVisibility() override;
    5454
    5555    private: // functions
  • code/trunk/src/modules/overlays/stats/Stats.cc

    r9667 r11071  
    4646    Stats::Stats(Context* context)
    4747        : OrxonoxOverlay(context)
    48         , statsOverlayNoise_(0)
    49         , statsOverlayBorder_(0)
     48        , statsOverlayNoise_(nullptr)
     49        , statsOverlayBorder_(nullptr)
    5050    {
    5151        RegisterObject(Stats);
  • code/trunk/src/modules/overlays/stats/Stats.h

    r9667 r11071  
    4646        void setConfigValues();
    4747
    48         virtual void tick(float dt);
     48        virtual void tick(float dt) override;
    4949
    5050    private: // variables
Note: See TracChangeset for help on using the changeset viewer.