Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9676 for code/trunk/src


Ignore:
Timestamp:
Sep 29, 2013, 4:27:05 PM (11 years ago)
Author:
landauf
Message:

fixed warnings with gcc 4.7

Location:
code/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/command/IOConsoleWindows.cc

    r9667 r9676  
    102102
    103103        // Erase input and status lines
    104         COORD pos = {0, this->inputLineRow_};
     104        COORD pos = makeCOORD(0, this->inputLineRow_);
    105105        this->writeText(std::string((this->inputLineHeight_ + this->statusLines_) * this->terminalWidth_, ' '), pos);
    106106        // Move cursor to the beginning of the line
     
    297297        {
    298298            // Scroll input and status lines down
    299             SMALL_RECT oldRect = {0, this->inputLineRow_,
    300                 this->terminalWidth_ - 1, this->inputLineRow_ + this->inputLineHeight_ + this->statusLines_ - 1};
     299            SMALL_RECT oldRect = makeSMALL_RECT(0, this->inputLineRow_,
     300                this->terminalWidth_ - 1, this->inputLineRow_ + this->inputLineHeight_ + this->statusLines_ - 1);
    301301            this->inputLineRow_ += linesDown;
    302302            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, this->inputLineRow_), &fillChar);
    303303            // Move cursor down to the new bottom so the user can see the status lines
    304             COORD pos = {0, this->inputLineRow_ + this->inputLineHeight_ - 1 + this->statusLines_};
     304            COORD pos = makeCOORD(0, this->inputLineRow_ + this->inputLineHeight_ - 1 + this->statusLines_);
    305305            SetConsoleCursorPosition(stdOutHandle_, pos);
    306306            // Get cursor back to the right position
     
    311311        {
    312312            // Scroll output up
    313             SMALL_RECT oldRect = {0, lines - linesDown, this->terminalWidth_ - 1, this->inputLineRow_ - 1};
     313            SMALL_RECT oldRect = makeSMALL_RECT(0, lines - linesDown, this->terminalWidth_ - 1, this->inputLineRow_ - 1);
    314314            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, 0), &fillChar);
    315315        }
     
    358358            // Scroll status lines up
    359359            int statusLineRow = this->inputLineRow_ + this->inputLineHeight_;
    360             SMALL_RECT oldRect = {0, statusLineRow, this->terminalWidth_ - 1, statusLineRow + this->statusLines_};
     360            SMALL_RECT oldRect = makeSMALL_RECT(0, statusLineRow, this->terminalWidth_ - 1, statusLineRow + this->statusLines_);
    361361            CHAR_INFO fillChar = {{' '}, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
    362362            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, statusLineRow + newLines), &fillChar);
     
    364364            if (-newLines - this->statusLines_ > 0)
    365365            {
    366                 COORD pos = {0, this->inputLineRow_ + newInputLineHeight + this->statusLines_};
     366                COORD pos = makeCOORD(0, this->inputLineRow_ + newInputLineHeight + this->statusLines_);
    367367                this->writeText(std::string((-newLines - this->statusLines_) * this->terminalWidth_, ' '), pos);
    368368            }
     
    398398        this->createNewOutputLines(this->lastOutputLineHeight_);
    399399        // Write the text
    400         COORD pos = {0, this->inputLineRow_ - this->lastOutputLineHeight_};
     400        COORD pos = makeCOORD(0, this->inputLineRow_ - this->lastOutputLineHeight_);
    401401        this->printOutputLine(it->first, it->second, pos);
    402402    }
  • code/trunk/src/libraries/core/command/IOConsoleWindows.h

    r8858 r9676  
    8080        void printOutputLine(const std::string& line, Shell::LineType type, const COORD& pos);
    8181
    82         static inline COORD makeCOORD(int x, int y)
     82        static inline COORD makeCOORD(SHORT x, SHORT y)
    8383        {
    8484            COORD val = {x, y};
     85            return val;
     86        }
     87
     88        static inline SMALL_RECT makeSMALL_RECT(SHORT left, SHORT top, SHORT right, SHORT bottom)
     89        {
     90            SMALL_RECT val = {left, top, right, bottom};
    8591            return val;
    8692        }
  • code/trunk/src/orxonox/gametypes/Dynamicmatch.h

    r9667 r9676  
    8383
    8484        protected:
    85             inline int getPlayerCount() const
     85            inline unsigned int getPlayerCount() const
    8686                 { return this->numberOf[chaser] + numberOf[piggy] + this->numberOf[killer]; }
    8787
Note: See TracChangeset for help on using the changeset viewer.