X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb0afb266214f827417c42474168c7edda7c953e..7f1de2b26e841b21110dadf3b9f2d543703eaf45:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index bf6dea6c5e..7ab4f7799c 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -668,11 +668,9 @@ bool wxCalendarCtrl::IsDateShown(const wxDateTime& date) const bool wxCalendarCtrl::IsDateInRange(const wxDateTime& date) const { - bool retval = TRUE; // Check if the given date is in the range specified - retval = ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE ) + return ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE ) && ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : TRUE ) ); - return retval; } bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const @@ -1371,7 +1369,7 @@ bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) c } else { - day += ( startOnMonday ) ? 0 : 1; + *day += ( startOnMonday ) ? 0 : 1; } int targetmonth = date.GetMonth() + (12 * date.GetYear());