Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios][editor] Fix unintended fallthrough in switch-case #7961

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

dvdmrtnz
Copy link
Contributor

A break was missing in the switch-case and was causing a fallthrough and a crash in debug. This fixes it.

Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
@@ -965,6 +965,7 @@ - (void)cell:(UITableViewCell *)cell changeSegmented:(YesNoUnknown)changeSegment
m_mapObject.SetMetadata(feature::Metadata::FMD_DRIVE_THROUGH, "");
break;
}
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be cleaner to use if instead of the top level switch? It only handles one case.

Copy link
Contributor Author

@dvdmrtnz dvdmrtnz Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it as a switch because I expect other metadata will be added there too in the near future:
takeaway=yes/no
delivery=yes/no
toilets=yes/no
changing_table=yes/no

Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

@biodranik biodranik merged commit a7f0292 into organicmaps:master Apr 20, 2024
5 checks passed
@dvdmrtnz dvdmrtnz deleted the drivethrough branch April 20, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants