MSVC compilation fixes: don't use std{out,err} as variable names; don't reuse loop variables

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-04-12 18:41:51 +00:00
parent 32c122fe28
commit 3814912fca

View File

@@ -50,9 +50,9 @@ public:
void OnTerminate(int WXUNUSED(pid), int status) void OnTerminate(int WXUNUSED(pid), int status)
{ {
wxStringOutputStream stdout, stderr; wxStringOutputStream out, err;
if (GetInputStream()) stdout.Write(*GetInputStream()); if (GetInputStream()) out.Write(*GetInputStream());
if (GetErrorStream()) stderr.Write(*GetErrorStream()); if (GetErrorStream()) err.Write(*GetErrorStream());
//wxPrintf("%s\n", stdout.GetString()); //wxPrintf("%s\n", stdout.GetString());
//wxPrintf("%s\n", stderr.GetString()); //wxPrintf("%s\n", stderr.GetString());
@@ -62,8 +62,8 @@ public:
// but then the assert dialog pop-ups and thus the app doesn't exit // but then the assert dialog pop-ups and thus the app doesn't exit
// FIXME: make assertion detection work also under other platforms // FIXME: make assertion detection work also under other platforms
// see http://trac.wxwidgets.org/ticket/10697 // see http://trac.wxwidgets.org/ticket/10697
m_crashed = stdout.GetString().Contains("assert") || m_crashed = out.GetString().Contains("assert") ||
stderr.GetString().Contains("assert"); err.GetString().Contains("assert");
m_exitCode = status; m_exitCode = status;
} }
@@ -102,11 +102,12 @@ public:
bool TestExec(const wxVector<wxFileName>& programs, long timeout) bool TestExec(const wxVector<wxFileName>& programs, long timeout)
{ {
size_t i;
wxVector<MonitorData*> data; wxVector<MonitorData*> data;
// run all programs specified as command line parameters // run all programs specified as command line parameters
wxArrayLong procID; wxArrayLong procID;
for (size_t i=0; i<programs.size(); i++) for (i=0; i<programs.size(); i++)
{ {
MonitorData *dt = new MonitorData(programs[i].GetFullPath()); MonitorData *dt = new MonitorData(programs[i].GetFullPath());
@@ -128,7 +129,7 @@ bool TestExec(const wxVector<wxFileName>& programs, long timeout)
// check if all processes are still running // check if all processes are still running
bool allok = true; bool allok = true;
for (size_t i=0; i<data.size(); i++) for (i=0; i<data.size(); i++)
{ {
MonitoredProcess& proc = data[i]->process; MonitoredProcess& proc = data[i]->process;
const wxString& prog = data[i]->program; const wxString& prog = data[i]->program;