From 6ab8345148dac5decb0df5b300350ca0dadb3bf5 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 28 Nov 2012 07:50:52 -0800 Subject: [PATCH] Use nullptr in more places --- aegisub/src/audio_display.cpp | 2 +- aegisub/src/auto4_lua_assfile.cpp | 2 +- aegisub/src/block_cache.h | 2 +- aegisub/src/dialog_kara_timing_copy.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index 17baed6e2..99e4b4af5 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -1172,7 +1172,7 @@ void AudioDisplay::OnAudioOpen(AudioProvider *provider) { 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->AddPlaybackStopListener(&AudioDisplay::RemoveTrackCursor, this)); connections.push_back(controller->AddTimingControllerListener(&AudioDisplay::OnTimingController, this)); diff --git a/aegisub/src/auto4_lua_assfile.cpp b/aegisub/src/auto4_lua_assfile.cpp index 3994f9519..1e1f98866 100644 --- a/aegisub/src/auto4_lua_assfile.cpp +++ b/aegisub/src/auto4_lua_assfile.cpp @@ -555,7 +555,7 @@ namespace Automation4 { } int n = lua_gettop(L); - std::vector new_entries(n - 1, (AssEntry *)0); + std::vector new_entries(n - 1, nullptr); for (int i = 2; i <= n; i++) { lua_pushvalue(L, i); AssEntry *e = LuaToAssEntry(L); diff --git a/aegisub/src/block_cache.h b/aegisub/src/block_cache.h index 6990995b7..dbb4d11a8 100644 --- a/aegisub/src/block_cache.h +++ b/aegisub/src/block_cache.h @@ -216,7 +216,7 @@ public: for (; it != age.end() && cur_size < max_size; ++it) { 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 for (; it != age.end();) diff --git a/aegisub/src/dialog_kara_timing_copy.cpp b/aegisub/src/dialog_kara_timing_copy.cpp index 70aa258fa..5caa5b0e2 100644 --- a/aegisub/src/dialog_kara_timing_copy.cpp +++ b/aegisub/src/dialog_kara_timing_copy.cpp @@ -146,8 +146,8 @@ KaraokeLineMatchDisplay::KaraokeLineMatchDisplay(wxWindow *parent) SetMaxSize(wxSize(-1, best_size.GetHeight())); SetMinSize(best_size); - Bind(wxEVT_SET_FOCUS, std::bind(&wxControl::Refresh, this, true, (const wxRect*)0)); - Bind(wxEVT_KILL_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, nullptr)); Bind(wxEVT_PAINT, &KaraokeLineMatchDisplay::OnPaint, this); }