Stratosphère: Simplify some for loops (#76)

Simplifies some loops by removing the need to manually calculate or
re-specify the array size. Eliminates any chance of using the
wrong size and less typing.
This commit is contained in:
Léo Lam
2018-05-04 01:24:34 +02:00
committed by SciresM
parent 7ab9f507cb
commit 999498c0a0
3 changed files with 12 additions and 12 deletions

View File

@@ -151,11 +151,11 @@ int main(int argc, char **argv)
LaunchTitle(0x0100000000000007, 3, 0, NULL);
bool maintenance = ShouldForceMaintenanceMode();
for (unsigned int i = 0; i < sizeof(g_additional_launch_programs) / sizeof(g_additional_launch_programs[0]); i++) {
if (!maintenance || std::get<bool>(g_additional_launch_programs[i])) {
LaunchTitle(std::get<u64>(g_additional_launch_programs[i]), 3, 0, NULL);
for (auto &launch_program : g_additional_launch_programs) {
if (!maintenance || std::get<bool>(launch_program)) {
LaunchTitle(std::get<u64>(launch_program), 3, 0, NULL);
}
}
return 0;
}
}