Wrap variable initializations after '=' consistently
Replace a few occurrences of type var = value; with type var = value; which is used much more widely in wx sources for consistency. Also get rid of a couple of such lines, when it could be done easily. No real changes.
This commit is contained in:
@@ -168,8 +168,8 @@ void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data)
|
|||||||
|
|
||||||
if ( HasClientObjectData() )
|
if ( HasClientObjectData() )
|
||||||
{
|
{
|
||||||
wxClientData * clientDataOld
|
wxClientData * clientDataOld =
|
||||||
= static_cast<wxClientData *>(DoGetItemClientData(n));
|
static_cast<wxClientData *>(DoGetItemClientData(n));
|
||||||
if ( clientDataOld )
|
if ( clientDataOld )
|
||||||
delete clientDataOld;
|
delete clientDataOld;
|
||||||
}
|
}
|
||||||
|
@@ -1317,8 +1317,8 @@ wxImage wxImage::Rotate90( bool clockwise ) const
|
|||||||
|
|
||||||
for (long j = 0; j < height; j++)
|
for (long j = 0; j < height; j++)
|
||||||
{
|
{
|
||||||
const unsigned char *source_data
|
const unsigned char *source_data =
|
||||||
= M_IMGDATA->m_data + (j*width + ii)*3;
|
M_IMGDATA->m_data + (j*width + ii)*3;
|
||||||
|
|
||||||
for (long i = ii; i < next_ii; i++)
|
for (long i = ii; i < next_ii; i++)
|
||||||
{
|
{
|
||||||
|
@@ -544,10 +544,9 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
|
|||||||
const int iHeight = image->GetHeight();
|
const int iHeight = image->GetHeight();
|
||||||
const int iWidth = image->GetWidth();
|
const int iWidth = image->GetWidth();
|
||||||
|
|
||||||
const bool bHasPngFormatOption
|
const bool hasPngFormatOption = image->HasOption(wxIMAGE_OPTION_PNG_FORMAT);
|
||||||
= image->HasOption(wxIMAGE_OPTION_PNG_FORMAT);
|
|
||||||
|
|
||||||
int iColorType = bHasPngFormatOption
|
int iColorType = hasPngFormatOption
|
||||||
? image->GetOptionInt(wxIMAGE_OPTION_PNG_FORMAT)
|
? image->GetOptionInt(wxIMAGE_OPTION_PNG_FORMAT)
|
||||||
: wxPNG_TYPE_COLOUR;
|
: wxPNG_TYPE_COLOUR;
|
||||||
|
|
||||||
@@ -556,7 +555,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
|
|||||||
|
|
||||||
bool bUsePalette = iColorType == wxPNG_TYPE_PALETTE
|
bool bUsePalette = iColorType == wxPNG_TYPE_PALETTE
|
||||||
#if wxUSE_PALETTE
|
#if wxUSE_PALETTE
|
||||||
|| (!bHasPngFormatOption && image->HasPalette() )
|
|| (!hasPngFormatOption && image->HasPalette() )
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@@ -804,8 +804,8 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
|||||||
if (hasAlpha)
|
if (hasAlpha)
|
||||||
{
|
{
|
||||||
value = image->GetAlpha(column, row);
|
value = image->GetAlpha(column, row);
|
||||||
buf[column*bytesPerPixel+1]
|
buf[column*bytesPerPixel+1] = minIsWhite ? 255 - value
|
||||||
= minIsWhite ? 255 - value : value;
|
: value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -332,8 +332,8 @@ void wxGenericColourDialog::CreateWidgets()
|
|||||||
|
|
||||||
const wxSizerFlags sliderLabelFlags = wxSizerFlags().Right().Border();
|
const wxSizerFlags sliderLabelFlags = wxSizerFlags().Right().Border();
|
||||||
const wxSizerFlags onesliderFlags = wxSizerFlags().CenterHorizontal();
|
const wxSizerFlags onesliderFlags = wxSizerFlags().CenterHorizontal();
|
||||||
const wxSizerFlags sliderFlags
|
const wxSizerFlags sliderFlags =
|
||||||
= wxSizerFlags().CentreVertical().DoubleBorder();
|
wxSizerFlags().CentreVertical().DoubleBorder();
|
||||||
|
|
||||||
wxBoxSizer *redSliderSizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *redSliderSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
redSliderSizer->Add(new wxStaticText(this, wxID_ANY, _("Red:")), sliderLabelFlags);
|
redSliderSizer->Add(new wxStaticText(this, wxID_ANY, _("Red:")), sliderLabelFlags);
|
||||||
|
@@ -244,8 +244,8 @@ bool wxGenericProgressDialog::Create( const wxString& title,
|
|||||||
|
|
||||||
const int borderFlags = wxALL;
|
const int borderFlags = wxALL;
|
||||||
|
|
||||||
wxSizerFlags sizerFlags
|
wxSizerFlags sizerFlags =
|
||||||
= wxSizerFlags().Border(borderFlags, LAYOUT_MARGIN);
|
wxSizerFlags().Border(borderFlags, LAYOUT_MARGIN);
|
||||||
|
|
||||||
if ( HasPDFlag(wxPD_CAN_SKIP) )
|
if ( HasPDFlag(wxPD_CAN_SKIP) )
|
||||||
{
|
{
|
||||||
|
@@ -393,8 +393,8 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
|||||||
|
|
||||||
if ( tool->IsRadio() )
|
if ( tool->IsRadio() )
|
||||||
{
|
{
|
||||||
wxToolBarToolsList::compatibility_iterator node
|
wxToolBarToolsList::compatibility_iterator node =
|
||||||
= wxToolBarToolsList::compatibility_iterator();
|
wxToolBarToolsList::compatibility_iterator();
|
||||||
if ( pos )
|
if ( pos )
|
||||||
node = m_tools.Item(pos - 1);
|
node = m_tools.Item(pos - 1);
|
||||||
|
|
||||||
|
@@ -794,8 +794,8 @@ void wxApp::MSWProcessPendingEventsIfNeeded()
|
|||||||
{
|
{
|
||||||
// The cast below is safe as wxEventLoop derives from wxMSWEventLoopBase in
|
// The cast below is safe as wxEventLoop derives from wxMSWEventLoopBase in
|
||||||
// both console and GUI applications.
|
// both console and GUI applications.
|
||||||
wxMSWEventLoopBase * const evtLoop
|
wxMSWEventLoopBase * const evtLoop =
|
||||||
= static_cast<wxMSWEventLoopBase *>(wxEventLoop::GetActive());
|
static_cast<wxMSWEventLoopBase *>(wxEventLoop::GetActive());
|
||||||
if ( evtLoop && evtLoop->MSWIsWakeUpRequested() )
|
if ( evtLoop && evtLoop->MSWIsWakeUpRequested() )
|
||||||
ProcessPendingEvents();
|
ProcessPendingEvents();
|
||||||
}
|
}
|
||||||
|
@@ -83,11 +83,11 @@ namespace
|
|||||||
typedef BOOL (WINAPI *GetProcessUserModeExceptionPolicy_t)(LPDWORD);
|
typedef BOOL (WINAPI *GetProcessUserModeExceptionPolicy_t)(LPDWORD);
|
||||||
typedef BOOL (WINAPI *SetProcessUserModeExceptionPolicy_t)(DWORD);
|
typedef BOOL (WINAPI *SetProcessUserModeExceptionPolicy_t)(DWORD);
|
||||||
|
|
||||||
GetProcessUserModeExceptionPolicy_t gs_pfnGetProcessUserModeExceptionPolicy
|
GetProcessUserModeExceptionPolicy_t gs_pfnGetProcessUserModeExceptionPolicy =
|
||||||
= (GetProcessUserModeExceptionPolicy_t) -1;
|
(GetProcessUserModeExceptionPolicy_t) -1;
|
||||||
|
|
||||||
SetProcessUserModeExceptionPolicy_t gs_pfnSetProcessUserModeExceptionPolicy
|
SetProcessUserModeExceptionPolicy_t gs_pfnSetProcessUserModeExceptionPolicy =
|
||||||
= (SetProcessUserModeExceptionPolicy_t) -1;
|
(SetProcessUserModeExceptionPolicy_t) -1;
|
||||||
|
|
||||||
DWORD gs_oldExceptionPolicyFlags = 0;
|
DWORD gs_oldExceptionPolicyFlags = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user