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() )
|
||||
{
|
||||
wxClientData * clientDataOld
|
||||
= static_cast<wxClientData *>(DoGetItemClientData(n));
|
||||
wxClientData * clientDataOld =
|
||||
static_cast<wxClientData *>(DoGetItemClientData(n));
|
||||
if ( clientDataOld )
|
||||
delete clientDataOld;
|
||||
}
|
||||
|
@@ -1317,8 +1317,8 @@ wxImage wxImage::Rotate90( bool clockwise ) const
|
||||
|
||||
for (long j = 0; j < height; j++)
|
||||
{
|
||||
const unsigned char *source_data
|
||||
= M_IMGDATA->m_data + (j*width + ii)*3;
|
||||
const unsigned char *source_data =
|
||||
M_IMGDATA->m_data + (j*width + ii)*3;
|
||||
|
||||
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 iWidth = image->GetWidth();
|
||||
|
||||
const bool bHasPngFormatOption
|
||||
= image->HasOption(wxIMAGE_OPTION_PNG_FORMAT);
|
||||
const bool hasPngFormatOption = image->HasOption(wxIMAGE_OPTION_PNG_FORMAT);
|
||||
|
||||
int iColorType = bHasPngFormatOption
|
||||
int iColorType = hasPngFormatOption
|
||||
? image->GetOptionInt(wxIMAGE_OPTION_PNG_FORMAT)
|
||||
: wxPNG_TYPE_COLOUR;
|
||||
|
||||
@@ -556,7 +555,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
|
||||
|
||||
bool bUsePalette = iColorType == wxPNG_TYPE_PALETTE
|
||||
#if wxUSE_PALETTE
|
||||
|| (!bHasPngFormatOption && image->HasPalette() )
|
||||
|| (!hasPngFormatOption && image->HasPalette() )
|
||||
#endif
|
||||
;
|
||||
|
||||
|
@@ -804,8 +804,8 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
||||
if (hasAlpha)
|
||||
{
|
||||
value = image->GetAlpha(column, row);
|
||||
buf[column*bytesPerPixel+1]
|
||||
= minIsWhite ? 255 - value : value;
|
||||
buf[column*bytesPerPixel+1] = minIsWhite ? 255 - value
|
||||
: value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -332,8 +332,8 @@ void wxGenericColourDialog::CreateWidgets()
|
||||
|
||||
const wxSizerFlags sliderLabelFlags = wxSizerFlags().Right().Border();
|
||||
const wxSizerFlags onesliderFlags = wxSizerFlags().CenterHorizontal();
|
||||
const wxSizerFlags sliderFlags
|
||||
= wxSizerFlags().CentreVertical().DoubleBorder();
|
||||
const wxSizerFlags sliderFlags =
|
||||
wxSizerFlags().CentreVertical().DoubleBorder();
|
||||
|
||||
wxBoxSizer *redSliderSizer = new wxBoxSizer(wxVERTICAL);
|
||||
redSliderSizer->Add(new wxStaticText(this, wxID_ANY, _("Red:")), sliderLabelFlags);
|
||||
|
@@ -244,8 +244,8 @@ bool wxGenericProgressDialog::Create( const wxString& title,
|
||||
|
||||
const int borderFlags = wxALL;
|
||||
|
||||
wxSizerFlags sizerFlags
|
||||
= wxSizerFlags().Border(borderFlags, LAYOUT_MARGIN);
|
||||
wxSizerFlags sizerFlags =
|
||||
wxSizerFlags().Border(borderFlags, LAYOUT_MARGIN);
|
||||
|
||||
if ( HasPDFlag(wxPD_CAN_SKIP) )
|
||||
{
|
||||
|
@@ -393,8 +393,8 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
|
||||
if ( tool->IsRadio() )
|
||||
{
|
||||
wxToolBarToolsList::compatibility_iterator node
|
||||
= wxToolBarToolsList::compatibility_iterator();
|
||||
wxToolBarToolsList::compatibility_iterator node =
|
||||
wxToolBarToolsList::compatibility_iterator();
|
||||
if ( pos )
|
||||
node = m_tools.Item(pos - 1);
|
||||
|
||||
|
@@ -794,8 +794,8 @@ void wxApp::MSWProcessPendingEventsIfNeeded()
|
||||
{
|
||||
// The cast below is safe as wxEventLoop derives from wxMSWEventLoopBase in
|
||||
// both console and GUI applications.
|
||||
wxMSWEventLoopBase * const evtLoop
|
||||
= static_cast<wxMSWEventLoopBase *>(wxEventLoop::GetActive());
|
||||
wxMSWEventLoopBase * const evtLoop =
|
||||
static_cast<wxMSWEventLoopBase *>(wxEventLoop::GetActive());
|
||||
if ( evtLoop && evtLoop->MSWIsWakeUpRequested() )
|
||||
ProcessPendingEvents();
|
||||
}
|
||||
|
@@ -83,11 +83,11 @@ namespace
|
||||
typedef BOOL (WINAPI *GetProcessUserModeExceptionPolicy_t)(LPDWORD);
|
||||
typedef BOOL (WINAPI *SetProcessUserModeExceptionPolicy_t)(DWORD);
|
||||
|
||||
GetProcessUserModeExceptionPolicy_t gs_pfnGetProcessUserModeExceptionPolicy
|
||||
= (GetProcessUserModeExceptionPolicy_t) -1;
|
||||
GetProcessUserModeExceptionPolicy_t gs_pfnGetProcessUserModeExceptionPolicy =
|
||||
(GetProcessUserModeExceptionPolicy_t) -1;
|
||||
|
||||
SetProcessUserModeExceptionPolicy_t gs_pfnSetProcessUserModeExceptionPolicy
|
||||
= (SetProcessUserModeExceptionPolicy_t) -1;
|
||||
SetProcessUserModeExceptionPolicy_t gs_pfnSetProcessUserModeExceptionPolicy =
|
||||
(SetProcessUserModeExceptionPolicy_t) -1;
|
||||
|
||||
DWORD gs_oldExceptionPolicyFlags = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user