Elminated streams from scoredlg.cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-01-08 09:13:02 +00:00
parent 405b381007
commit 70bfcd7c2c

View File

@@ -27,16 +27,6 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__MWERKS__)
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#else
#include <strstream>
//using namespace std;
#endif
#include "scorefil.h" #include "scorefil.h"
#include "scoredg.h" #include "scoredg.h"
@@ -66,9 +56,9 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) :
wxArrayString players; wxArrayString players;
scoreFile->GetPlayerList( players); scoreFile->GetPlayerList( players);
ostrstream os; wxString os;
os << "Player\tWins\tGames\tScore\n"; os << wxT("Player\tWins\tGames\tScore\n");
for (unsigned int i = 0; i < players.Count(); i++) for (unsigned int i = 0; i < players.Count(); i++)
{ {
int wins, games, score; int wins, games, score;
@@ -79,15 +69,13 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) :
average = (2 * score + games) / (2 * games); average = (2 * score + games) / (2 * games);
} }
os << players[i] << '\t' os << players[i] << wxT('\t')
<< wins << '\t' << wins << wxT('\t')
<< games << '\t' << games << wxT('\t')
<< average << '\n'; << average << wxT('\n');
} }
os << '\0'; os << wxT('\0');
char* str = os.str(); m_text = os;
m_text = str;
delete str;
} }
ScoreCanvas::~ScoreCanvas() ScoreCanvas::~ScoreCanvas()