WX_DECLARE_LIST(EventWorker, EList);
class Client : public wxApp {
- DECLARE_EVENT_TABLE();
+ DECLARE_EVENT_TABLE()
public:
void RemoveEventWorker(EventWorker* p_worker);
private:
class EventWorker : public wxEvtHandler
{
- DECLARE_EVENT_TABLE();
+ DECLARE_EVENT_TABLE()
public:
EventWorker(const wxString& p_host, char* p_buf, int p_size);
void Run();
int
Client::OnRun()
{
+ int i;
switch(m_sendType)
{
case STRESS_TEST:
switch(m_workMode)
{
case THREADS:
- for (int i = 0; i < m_stressWorkers; i++) {
+ for (i = 0; i < m_stressWorkers; i++) {
if (m_message.empty())
StartWorker(THREADS);
else
}
break;
case EVENTS:
- for (int i = 0; i < m_stressWorkers; i++) {
+ for (i = 0; i < m_stressWorkers; i++) {
if (m_message.empty())
StartWorker(EVENTS);
else
}
break;
default:
- for (int i = 0; i < m_stressWorkers; i++) {
+ for (i = 0; i < m_stressWorkers; i++) {
if (m_message.empty())
StartWorker(i % 5 == 0 ? THREADS : EVENTS);
else
break;
}
}
- for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it = it->GetNext())
+ for(EList::compatibility_iterator it2 = m_eventWorkers.GetFirst(); it2 ; it2 = it2->GetNext())
{
- if (it->GetData() == pEvent.m_sender) {
- delete it->GetData();
- m_eventWorkers.DeleteNode(it);
+ if (it2->GetData() == pEvent.m_sender) {
+ delete it2->GetData();
+ m_eventWorkers.DeleteNode(it2);
break;
}
}