[Orxonox-commit 1478] r6196 - code/branches/presentation2/src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Wed Dec 2 14:42:56 CET 2009
Author: landauf
Date: 2009-12-02 14:42:56 +0100 (Wed, 02 Dec 2009)
New Revision: 6196
Modified:
code/branches/presentation2/src/libraries/core/IOConsole.cc
code/branches/presentation2/src/libraries/core/IOConsole.h
Log:
fixed some warnings in IOConsole
Modified: code/branches/presentation2/src/libraries/core/IOConsole.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/IOConsole.cc 2009-12-02 13:40:22 UTC (rev 6195)
+++ code/branches/presentation2/src/libraries/core/IOConsole.cc 2009-12-02 13:42:56 UTC (rev 6196)
@@ -457,8 +457,8 @@
, buffer_(shell_->getInputBuffer())
, cout_(std::cout.rdbuf())
, promptString_("orxonox # ")
+ , inputLineHeight_(1)
, statusLines_(1)
- , inputLineHeight_(1)
, lastOutputLineHeight_(0)
{
// Disable standard this->cout_ logging
@@ -683,7 +683,7 @@
*/
void IOConsole::createNewOutputLines(int lines)
{
- CHAR_INFO fillChar = {' ', FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
+ CHAR_INFO fillChar = {{' '}, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
// Lines to scroll input/status down (if possible)
int linesDown = clamp(terminalHeight_ - inputLineRow_ - inputLineHeight_ - statusLines_, 0, lines);
if (linesDown > 0)
@@ -731,7 +731,7 @@
// Scroll status lines up
int statusLineRow = this->inputLineRow_ + this->inputLineHeight_;
SMALL_RECT oldRect = {0, statusLineRow, this->terminalWidth_ - 1, statusLineRow + this->statusLines_};
- CHAR_INFO fillChar = {' ', FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
+ CHAR_INFO fillChar = {{' '}, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, statusLineRow + newLines), &fillChar);
// Clear potential leftovers
if (-newLines - this->statusLines_ > 0)
Modified: code/branches/presentation2/src/libraries/core/IOConsole.h
===================================================================
--- code/branches/presentation2/src/libraries/core/IOConsole.h 2009-12-02 13:40:22 UTC (rev 6195)
+++ code/branches/presentation2/src/libraries/core/IOConsole.h 2009-12-02 13:42:56 UTC (rev 6196)
@@ -42,7 +42,9 @@
struct termios;
#elif defined(ORXONOX_PLATFORM_WINDOWS)
#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
#define NOMINMAX
+#endif
#include <windows.h>
#endif
More information about the Orxonox-commit
mailing list