Rearrange states in the switch in a more logical order
No real changes, just try to organize the code in a more logical order.
This commit is contained in:
@@ -68,7 +68,14 @@ public:
|
|||||||
{
|
{
|
||||||
switch (evt.GetState())
|
switch (evt.GetState())
|
||||||
{
|
{
|
||||||
case wxWebRequest::State_Unauthorized:
|
case wxWebRequest::State_Idle:
|
||||||
|
FAIL("should never get events with State_Idle");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxWebRequest::State_Active:
|
||||||
|
CHECK( request.GetNativeHandle() );
|
||||||
|
break;
|
||||||
|
|
||||||
case wxWebRequest::State_Completed:
|
case wxWebRequest::State_Completed:
|
||||||
if ( request.GetStorage() == wxWebRequest::Storage_File )
|
if ( request.GetStorage() == wxWebRequest::Storage_File )
|
||||||
{
|
{
|
||||||
@@ -76,18 +83,12 @@ public:
|
|||||||
CHECK( fn.GetSize() == expectedFileSize );
|
CHECK( fn.GetSize() == expectedFileSize );
|
||||||
}
|
}
|
||||||
wxFALLTHROUGH;
|
wxFALLTHROUGH;
|
||||||
|
|
||||||
|
case wxWebRequest::State_Unauthorized:
|
||||||
case wxWebRequest::State_Failed:
|
case wxWebRequest::State_Failed:
|
||||||
case wxWebRequest::State_Cancelled:
|
case wxWebRequest::State_Cancelled:
|
||||||
loop.Exit();
|
loop.Exit();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxWebRequest::State_Idle:
|
|
||||||
FAIL("should never get events with State_Idle");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case wxWebRequest::State_Active:
|
|
||||||
CHECK( request.GetNativeHandle() );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user