avoid loop container detach

This commit is contained in:
in1tiate 2025-01-11 02:27:35 -06:00
parent dd378d1040
commit 2389ecfa97

View File

@ -1407,7 +1407,7 @@ void Courtroom::set_background(QString p_background, bool display)
// Populate the dropdown list with all pos that exist on this bg
QStringList pos_list = {};
for (const QString &key : default_pos)
for (const QString &key : std::as_const(default_pos))
{
if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(default_pos[key]))) || // if we have 2.8-style positions, e.g. def.png, wit.webp, hld.apng
file_exists(ao_app->get_image_suffix(ao_app->get_background_path(key))))