Use nullptr in more places

This commit is contained in:
Thomas Goyne 2012-11-28 07:50:52 -08:00
parent 7a7a036017
commit 6ab8345148
4 changed files with 5 additions and 5 deletions

View file

@ -1172,7 +1172,7 @@ void AudioDisplay::OnAudioOpen(AudioProvider *provider)
{ {
if (connections.empty()) if (connections.empty())
{ {
connections.push_back(controller->AddAudioCloseListener(&AudioDisplay::OnAudioOpen, this, (AudioProvider*)0)); connections.push_back(controller->AddAudioCloseListener(&AudioDisplay::OnAudioOpen, this, nullptr));
connections.push_back(controller->AddPlaybackPositionListener(&AudioDisplay::OnPlaybackPosition, this)); connections.push_back(controller->AddPlaybackPositionListener(&AudioDisplay::OnPlaybackPosition, this));
connections.push_back(controller->AddPlaybackStopListener(&AudioDisplay::RemoveTrackCursor, this)); connections.push_back(controller->AddPlaybackStopListener(&AudioDisplay::RemoveTrackCursor, this));
connections.push_back(controller->AddTimingControllerListener(&AudioDisplay::OnTimingController, this)); connections.push_back(controller->AddTimingControllerListener(&AudioDisplay::OnTimingController, this));

View file

@ -555,7 +555,7 @@ namespace Automation4 {
} }
int n = lua_gettop(L); int n = lua_gettop(L);
std::vector<AssEntry *> new_entries(n - 1, (AssEntry *)0); std::vector<AssEntry *> new_entries(n - 1, nullptr);
for (int i = 2; i <= n; i++) { for (int i = 2; i <= n; i++) {
lua_pushvalue(L, i); lua_pushvalue(L, i);
AssEntry *e = LuaToAssEntry(L); AssEntry *e = LuaToAssEntry(L);

View file

@ -216,7 +216,7 @@ public:
for (; it != age.end() && cur_size < max_size; ++it) for (; it != age.end() && cur_size < max_size; ++it)
{ {
BlockArray &ba = (*it)->blocks; BlockArray &ba = (*it)->blocks;
cur_size += (ba.size() - std::count(ba.begin(), ba.end(), (BlockT*)0)) * block_size; cur_size += (ba.size() - std::count(ba.begin(), ba.end(), nullptr)) * block_size;
} }
// Hit max, clear all remaining blocks // Hit max, clear all remaining blocks
for (; it != age.end();) for (; it != age.end();)

View file

@ -146,8 +146,8 @@ KaraokeLineMatchDisplay::KaraokeLineMatchDisplay(wxWindow *parent)
SetMaxSize(wxSize(-1, best_size.GetHeight())); SetMaxSize(wxSize(-1, best_size.GetHeight()));
SetMinSize(best_size); SetMinSize(best_size);
Bind(wxEVT_SET_FOCUS, std::bind(&wxControl::Refresh, this, true, (const wxRect*)0)); Bind(wxEVT_SET_FOCUS, std::bind(&wxControl::Refresh, this, true, nullptr));
Bind(wxEVT_KILL_FOCUS, std::bind(&wxControl::Refresh, this, true, (const wxRect*)0)); Bind(wxEVT_KILL_FOCUS, std::bind(&wxControl::Refresh, this, true, nullptr));
Bind(wxEVT_PAINT, &KaraokeLineMatchDisplay::OnPaint, this); Bind(wxEVT_PAINT, &KaraokeLineMatchDisplay::OnPaint, this);
} }