Minor formatting and code style fixes
Put braces around loop body. Use const for local variables. No real changes.
This commit is contained in:
@@ -914,8 +914,8 @@ private:
|
|||||||
bool IsItemSingleValued(const wxDataViewItem& item) const
|
bool IsItemSingleValued(const wxDataViewItem& item) const
|
||||||
{
|
{
|
||||||
bool hadColumnWithValue = false;
|
bool hadColumnWithValue = false;
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
const unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
const wxDataViewModel* model = GetModel();
|
const wxDataViewModel* const model = GetModel();
|
||||||
for ( unsigned int i = 0; i < cols; i++ )
|
for ( unsigned int i = 0; i < cols; i++ )
|
||||||
{
|
{
|
||||||
if ( model->HasValue(item, i) )
|
if ( model->HasValue(item, i) )
|
||||||
@@ -929,14 +929,17 @@ private:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find first column with value
|
// Find the first column with a value in it.
|
||||||
wxDataViewColumn * FindFirstColumnWithValue(const wxDataViewItem& item) const
|
wxDataViewColumn* FindFirstColumnWithValue(const wxDataViewItem& item) const
|
||||||
{
|
{
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
const unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
const wxDataViewModel* model = GetModel();
|
const wxDataViewModel* const model = GetModel();
|
||||||
for ( unsigned int i ; i < cols; i++ )
|
for ( unsigned int i = 0; i < cols; i++ )
|
||||||
|
{
|
||||||
if ( model->HasValue(item, i) )
|
if ( model->HasValue(item, i) )
|
||||||
return GetOwner()->GetColumnAt(i);
|
return GetOwner()->GetColumnAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4549,7 +4552,7 @@ bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, wxK
|
|||||||
}
|
}
|
||||||
|
|
||||||
int idx = GetOwner()->GetColumnIndex(m_currentCol);
|
int idx = GetOwner()->GetColumnIndex(m_currentCol);
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
const unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
for ( unsigned int i = 0; i < cols; i++ )
|
for ( unsigned int i = 0; i < cols; i++ )
|
||||||
{
|
{
|
||||||
idx += (forward ? +1 : -1);
|
idx += (forward ? +1 : -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user