Skip to content

Commit

Permalink
wxFallthrough for C++11 backwards compatibility
Browse files Browse the repository at this point in the history
Gerhard Stein committed Mar 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a9e8a08 commit 616de3a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/billsdepositsdialog.cpp
Original file line number Diff line number Diff line change
@@ -1345,21 +1345,22 @@ void mmBDDialog::OnsetPrevOrNextRepeatDate(wxCommandEvent& event)
wxString valueStr = textNumRepeats_->GetValue();
int span = 1;
bool goPrev = (event.GetId() == ID_DIALOG_TRANS_BUTTONTRANSNUMPREV);

switch (repeatType)
{
case INXDAYS:
[[fallthrough]];
wxFALLTHROUGH;
case INXMONTHS:
[[fallthrough]];
wxFALLTHROUGH;
case EVERYXDAYS:
[[fallthrough]];
wxFALLTHROUGH;
case EVERYXMONTHS:
span = wxAtoi(valueStr);
if (!valueStr.IsNumber() || !span) {
mmErrorDialogs::ToolTip4Object(textNumRepeats_, _("Invalid value"), _("Error"));
break;
}
[[fallthrough]];
wxFALLTHROUGH;
default:
m_date_paid->SetValue(Model_Billsdeposits::nextOccurDate(repeatType, span, m_date_paid->GetValue(), goPrev));
m_date_due->SetValue(Model_Billsdeposits::nextOccurDate(repeatType, span, m_date_due->GetValue(), goPrev));

0 comments on commit 616de3a

Please sign in to comment.