- if (!item && compare(dialog->name(), existing_cinema->name) < 0) {
- if (auto existing_item = cinema_to_item(existing_cinema)) {
- item = add_cinema (cinema, *existing_item);
- }
+ if (compare(dialog->name(), existing_cinema->name) < 0) {
+ /* existing_cinema should be after the one we're inserting */
+ found = true;
+ break;