summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MenuBar.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2026-08-22 11:22:33 +0200
committerJosJuice <josjuice@gmail.com>2026-08-22 11:52:22 +0200
commitf93a8a995b6e16625c60303ccabb0ea71e7dbeb2 (patch)
treec6303977d6dcd7538ac0eca1561cdb6b1b476b19 /Source/Core/DolphinQt/MenuBar.cpp
parent82f7ec53902d805a6f5091f913035f29499c873a (diff)
Common: Add DivideRoundingUp function
Many callers of AlignUp are dividing immediately after aligning. Let's add a helper function for this so callers don't have to specify the alignment size twice.
Diffstat (limited to 'Source/Core/DolphinQt/MenuBar.cpp')
-rw-r--r--Source/Core/DolphinQt/MenuBar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp
index 6d75ee4e79..f0ad6d2c78 100644
--- a/Source/Core/DolphinQt/MenuBar.cpp
+++ b/Source/Core/DolphinQt/MenuBar.cpp
@@ -1370,16 +1370,16 @@ void MenuBar::CheckNAND()
const QString user_cluster_message =
tr("The user-accessible part of your NAND contains %1 blocks (%2 KiB) "
"of data, out of an allowed maximum of %3 blocks (%4 KiB).")
- .arg(Common::AlignUp(result.used_clusters_user, IOS::HLE::FS::CLUSTERS_PER_BLOCK) /
- IOS::HLE::FS::CLUSTERS_PER_BLOCK)
+ .arg(Common::DivideRoundingUp(result.used_clusters_user,
+ IOS::HLE::FS::CLUSTERS_PER_BLOCK))
.arg((result.used_clusters_user * IOS::HLE::FS::CLUSTER_SIZE) / 1024)
.arg(IOS::HLE::FS::USER_CLUSTERS / IOS::HLE::FS::CLUSTERS_PER_BLOCK)
.arg((IOS::HLE::FS::USER_CLUSTERS * IOS::HLE::FS::CLUSTER_SIZE) / 1024);
const QString system_cluster_message =
tr("The system-reserved part of your NAND contains %1 blocks (%2 KiB) "
"of data, out of an allowed maximum of %3 blocks (%4 KiB).")
- .arg(Common::AlignUp(result.used_clusters_system, IOS::HLE::FS::CLUSTERS_PER_BLOCK) /
- IOS::HLE::FS::CLUSTERS_PER_BLOCK)
+ .arg(Common::DivideRoundingUp(result.used_clusters_system,
+ IOS::HLE::FS::CLUSTERS_PER_BLOCK))
.arg((result.used_clusters_system * IOS::HLE::FS::CLUSTER_SIZE) / 1024)
.arg(IOS::HLE::FS::SYSTEM_CLUSTERS / IOS::HLE::FS::CLUSTERS_PER_BLOCK)
.arg((IOS::HLE::FS::SYSTEM_CLUSTERS * IOS::HLE::FS::CLUSTER_SIZE) / 1024);