summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2026-07-29 18:15:38 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2026-07-29 18:15:38 +0200
commit61e97c9a099ed00261e299ddc43bc22c1479e220 (patch)
tree7cbb009ab32a3e852676a488805bb9366ab330d2
parent73de7b8d3e59d4bef685f582d305b65bdb85a707 (diff)
Replace zero constants with `nullptr`
-rw-r--r--Source/Core/Common/Hash.cpp2
-rw-r--r--Source/Core/Common/MemArenaUnix.cpp4
-rw-r--r--Source/Core/Common/TimeUtil.cpp2
-rw-r--r--Source/Core/Core/PowerPC/JitCommon/JitCache.h2
-rw-r--r--Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp2
-rw-r--r--Source/Core/VideoCommon/PerformanceMetrics.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/Common/Hash.cpp b/Source/Core/Common/Hash.cpp
index a3984745f5..3756bdcad4 100644
--- a/Source/Core/Common/Hash.cpp
+++ b/Source/Core/Common/Hash.cpp
@@ -427,7 +427,7 @@ u64 GetHash64(const u8* src, u32 len, u32 samples)
u32 StartCRC32()
{
- return crc32_z(0L, Z_NULL, 0);
+ return crc32_z(0L, nullptr, 0);
}
u32 UpdateCRC32(u32 crc, const u8* data, size_t len)
diff --git a/Source/Core/Common/MemArenaUnix.cpp b/Source/Core/Common/MemArenaUnix.cpp
index fd4af4e74b..26a123c081 100644
--- a/Source/Core/Common/MemArenaUnix.cpp
+++ b/Source/Core/Common/MemArenaUnix.cpp
@@ -149,8 +149,8 @@ void* LazyMemoryRegion::Create(size_t size)
if (size == 0)
return nullptr;
- void* memory =
- mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
+ void* memory = mmap(nullptr, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
if (memory == MAP_FAILED)
{
NOTICE_LOG_FMT(MEMMAP, "Memory allocation of {} bytes failed.", size);
diff --git a/Source/Core/Common/TimeUtil.cpp b/Source/Core/Common/TimeUtil.cpp
index e57078b7e9..fa47e23503 100644
--- a/Source/Core/Common/TimeUtil.cpp
+++ b/Source/Core/Common/TimeUtil.cpp
@@ -17,7 +17,7 @@ std::optional<std::tm> LocalTime(std::time_t time)
#ifdef _MSC_VER
if (localtime_s(&local_time, &time) != 0)
#else
- if (localtime_r(&time, &local_time) == NULL)
+ if (localtime_r(&time, &local_time) == nullptr)
#endif
{
ERROR_LOG_FMT(COMMON, "Failed to convert time to local time: {}", std::strerror(errno));
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h
index 4b5ac6fd80..8860a42b06 100644
--- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h
+++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h
@@ -231,7 +231,7 @@ private:
// It is used by the assembly dispatcher to quickly
// know where to jump based on pc and msr bits.
Common::LazyMemoryRegion m_entry_points_arena;
- u8** m_entry_points_ptr = 0;
+ u8** m_entry_points_ptr = nullptr;
// An alternative for the above but without a shm segment
// in case the shm memory region couldn't be allocated.
diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
index bdd0cc5d82..198b4db230 100644
--- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
@@ -78,7 +78,7 @@ private:
opt.decorationSize = QSize(0, 0);
// Default draw command for paint.
- QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &opt, painter, 0);
+ QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &opt, painter, nullptr);
// Draw pixmap at the center of the tablewidget cell
QPixmap pix = qvariant_cast<QPixmap>(index.data(Qt::DecorationRole));
diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp
index 98efa64108..7ea96bd183 100644
--- a/Source/Core/VideoCommon/PerformanceMetrics.cpp
+++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp
@@ -191,7 +191,7 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
if (g_ActiveConfig.bShowGraphs)
{
// A font size of 13 is small enough to keep the tick numbers from overlapping too much.
- ImGui::PushFont(NULL, 13.0f);
+ ImGui::PushFont(nullptr, 13.0f);
ImGui::PushStyleColor(ImGuiCol_ResizeGrip, 0);
const auto graph_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoNav | movable_flag |