Use '0' instead of NULL

This commit is contained in:
2011-08-14 17:47:16 +02:00
parent c4a88fb459
commit 66a60bf7a6
22 changed files with 67 additions and 67 deletions

View File

@@ -19,7 +19,7 @@
#include "CalendarEditor.h"
CalendarEditor::CalendarEditor(int day, int month, int year) : _day(day), _month(month), _year(year), _parent(NULL), _days(NULL), _editor(NULL)
CalendarEditor::CalendarEditor(int day, int month, int year) : _day(day), _month(month), _year(year), _parent(0), _days(0), _editor(0)
{
wxDateTime date;
int i;
@@ -60,7 +60,7 @@ void CalendarEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHa
_parent = parent;
_editor->Create(parent, id, wxDefaultPosition, wxDefaultSize, _maxDay, _days);
_editor->Select(_day);
_editor->Connect((int)id, (int)wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CalendarEditor::OnDateChanged), NULL, this);
_editor->Connect((int)id, (int)wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(CalendarEditor::OnDateChanged), 0, this);
}
bool CalendarEditor::EndEdit (int row, int col, wxGrid *grid)
@@ -97,7 +97,7 @@ void CalendarEditor::SetSize (const wxRect &rect)
void CalendarEditor::StartingClick()
{
Show(true, NULL);
Show(true, 0);
}
bool CalendarEditor::IsAcceptedKey(wxKeyEvent &event)

View File

@@ -41,7 +41,7 @@ public:
void ApplyEdit(int row, int col, wxGrid *grid);
wxString GetValue() const;
void Reset();
void Show(bool show, wxGridCellAttr *attr=NULL);
void Show(bool show, wxGridCellAttr *attr=0);
void SetSize (const wxRect &rect);
/* void OnCalendarChange(wxCommandEvent& event); */
void OnDateChanged(wxCommandEvent& event);

View File

@@ -87,7 +87,7 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id,
_categories[i] = wxGetTranslation(categoryIt->name) ;
}
Connect(id, wxEVT_GRID_CELL_CHANGE, wxGridEventHandler(GridAccount::OnOperationModified), NULL, this);
Connect(id, wxEVT_GRID_CELL_CHANGE, wxGridEventHandler(GridAccount::OnOperationModified), 0, this);
AutoSizeColumn(TREE, false);
AutoSizeColumn(CATEGORY, false);
@@ -468,7 +468,7 @@ void GridAccount::OnCellLeftClick(wxGridEvent& evt)
if (/*evt.GetCol() == 0 && */IsInSelection(evt.GetRow(), evt.GetCol()))
{
//m_selTemp = m_selection;
m_selection = NULL;
m_selection = 0;
}
pEditor->DecRef();
evt.Skip();

View File

@@ -25,7 +25,7 @@ enum {BUTTON_ID = 1} ;
// EVT_BUTTON(BUTTON_ID, wxGridCellButtonEditor::OnButton)
// END_EVENT_TABLE()
wxGridCellButtonEditor::wxGridCellButtonEditor(const wxString& text) : _text(text), _button(NULL)
wxGridCellButtonEditor::wxGridCellButtonEditor(const wxString& text) : _text(text), _button(0)
{}
wxGridCellButtonEditor::~wxGridCellButtonEditor()
@@ -55,7 +55,7 @@ void wxGridCellButtonEditor::Create (wxWindow *parent, wxWindowID id, wxEvtHandl
{
if (_button) return;
_button = new wxButton(parent, id, _text);
_button->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxGridCellButtonEditor::OnButton), NULL, this);
_button->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxGridCellButtonEditor::OnButton), 0, this);
}
bool wxGridCellButtonEditor::EndEdit (int row, int col, /*const*/ wxGrid *grid/*, const wxString &oldval, wxString *newval*/)
@@ -79,7 +79,7 @@ void wxGridCellButtonEditor::SetSize (const wxRect &rect)
if (_button) _button->SetSize(rect);
}
void wxGridCellButtonEditor::Show (bool show, wxGridCellAttr *attr=NULL)
void wxGridCellButtonEditor::Show (bool show, wxGridCellAttr *attr=0)
{
if (_button) _button->Show(show);
}

View File

@@ -26,7 +26,7 @@ wxGridCellEditor* wxGridCellTreeButtonEditor::Clone () const
void wxGridCellTreeButtonEditor::BeginEdit (int row, int col, wxGrid *grid)
{
wxGridEvent evt(0, 0, NULL, row, col);
wxGridEvent evt(0, 0, 0, row, col);
_row = row;
_col = col;
@@ -71,6 +71,6 @@ void wxGridCellTreeButtonEditor::SetSize (const wxRect &rect)
{
}
void wxGridCellTreeButtonEditor::Show (bool show, wxGridCellAttr *attr=NULL)
void wxGridCellTreeButtonEditor::Show (bool show, wxGridCellAttr *attr=0)
{
}

View File

@@ -38,7 +38,7 @@ void wxMyGrid::OnCellLeftClick(wxGridEvent& evt)
if (evt.GetCol() == 0 && IsInSelection(evt.GetRow(), evt.GetCol()))
{
//m_selTemp = m_selection;
m_selection = NULL;
m_selection = 0;
}
pEditor->DecRef();
break;