[1231183] 'cleanup: mismatched indentation' and other cleanings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-22 17:08:42 +00:00
parent 66e9a9f0ae
commit 7448de8d8d
14 changed files with 413 additions and 404 deletions

View File

@@ -612,11 +612,14 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
nnm = *s ? s + 1 : s;
*s = 0;
// FIXME: wxGetUserHome could return temporary storage in Unicode mode
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL)
{
if (was_sep) /* replace only if it was there: */
*s = SEP;
s = NULL;
} else {
}
else
{
nm = nnm;
s = home;
}

View File

@@ -4,7 +4,7 @@
// Author: John Labenski
// Modified by:
// Created: 14.06.03 (extracted from src/*/filedlg.cpp)
// RCS-ID:
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -802,7 +802,8 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
// copy it to our buffer and free memory
// Crashes on SmartPhone (FIXME)
#if !defined(__SMARTPHONE__) /* of WinCE */
if( lpMsgBuf != 0 ) {
if( lpMsgBuf != 0 )
{
wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');

View File

@@ -293,10 +293,10 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
keyCode = WXK_WINDOWS_MENU;
else if ( current == wxT("COMMAND") )
keyCode = WXK_COMMAND;
else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) ) {
keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3); }
else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) ) {
keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1; }
else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) )
keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3);
else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) )
keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1;
else
{
wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),

View File

@@ -132,7 +132,7 @@ wxUint32 wxTextInputStream::Read32(int base)
if(!m_input) return 0;
wxString word = ReadWord();
if(word.IsEmpty())
if(word.empty())
return 0;
return wxStrtoul(word.c_str(), 0, base);
}
@@ -153,7 +153,7 @@ wxInt32 wxTextInputStream::Read32S(int base)
if(!m_input) return 0;
wxString word = ReadWord();
if(word.IsEmpty())
if(word.empty())
return 0;
return wxStrtol(word.c_str(), 0, base);
}
@@ -172,7 +172,7 @@ double wxTextInputStream::ReadDouble()
{
if(!m_input) return 0;
wxString word = ReadWord();
if(word.IsEmpty())
if(word.empty())
return 0;
return wxStrtod(word.c_str(), 0);
}

View File

@@ -4,7 +4,7 @@
// Author: Kevin Smith
// Modified by:
// Created: Jan 22 1999
// RCS-ID:
// RCS-ID: $Id$
// Copyright: (c) 1999 Kevin Smith
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -339,7 +339,7 @@ bool wxGenericValidator::TransferFromWindow(void)
if ( !m_validatorWindow )
return false;
// bool controls
// BOOL CONTROLS **************************************
#if wxUSE_CHECKBOX
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
{
@@ -362,7 +362,8 @@ bool wxGenericValidator::TransferFromWindow(void)
}
} else
#endif
// int controls
// INT CONTROLS ***************************************
#if wxUSE_GAUGE
if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
{
@@ -429,7 +430,8 @@ bool wxGenericValidator::TransferFromWindow(void)
}
} else
#endif
// string controls
// STRING CONTROLS ************************************
#if wxUSE_BUTTON
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
{
@@ -503,7 +505,8 @@ bool wxGenericValidator::TransferFromWindow(void)
}
} else
#endif
// array controls
// ARRAY CONTROLS *************************************
#if wxUSE_CHECKLISTBOX
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
@@ -554,6 +557,7 @@ bool wxGenericValidator::TransferFromWindow(void)
// unrecognized control, or bad pointer
return false;
return false;
}

View File

@@ -1972,7 +1972,6 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
{
wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str());
}
}
tmp = params.AfterFirst(_T(','));
if ( !tmp.empty() )
@@ -1986,7 +1985,6 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
{
wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str());
}
}
}
}

View File

@@ -118,8 +118,9 @@ wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid,
return DoGetBestSize(attr, dc, GetString(grid, row, col));
}
void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
if (!params.IsEmpty())
void wxGridCellDateTimeRenderer::SetParameters(const wxString& params)
{
if (!params.empty())
m_oformat=params;
}
@@ -134,7 +135,7 @@ void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
{
if (!choices.IsEmpty())
if (!choices.empty())
SetParameters(choices);
}
@@ -226,7 +227,7 @@ wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices)
{
m_startint = -1;
if (!choices.IsEmpty())
if (!choices.empty())
SetParameters(choices);
}
@@ -251,7 +252,7 @@ void wxGridCellEnumEditor::BeginEdit(int row, int col, wxGrid* grid)
else
{
wxString startValue = table->GetValue(row, col);
if (startValue.IsNumber() && !startValue.IsEmpty())
if (startValue.IsNumber() && !startValue.empty())
{
startValue.ToLong(&m_startint);
}
@@ -356,15 +357,17 @@ wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
tok += _T(" ");
dc.GetTextExtent(tok, &x, &y);
if ( curr_x + x > max_x) {
if ( curr_x + x > max_x)
{
lines.Add( wxString(thisline) );
thisline = tok;
curr_x=x;
} else {
}
else
{
thisline+= tok;
curr_x += x;
}
}
//Add last line
lines.Add( wxString(thisline) );