summaryrefslogtreecommitdiff
path: root/library/backend/event.cpp
Side-by-side diff
Diffstat (limited to 'library/backend/event.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/event.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 90860e8..abc420b 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -378,49 +378,49 @@ int Event::week( const QDate& date )
if ( date.dayOfWeek() < tmp.dayOfWeek() )
++week;
week += ( date.day() - 1 ) / 7;
return week;
}
/*!
\internal
*/
int Event::occurrence( const QDate& date )
{
// calculates the number of occurrances of this day of the
// week till the given date (e.g 3rd Wednesday of the month)
return ( date.day() - 1 ) / 7 + 1;
}
/*!
\internal
*/
int Event::dayOfWeek( char day )
{
int dayOfWeek = 1;
char i = Event::MON;
- while ( !( i & day ) && i <= Event::SUN ) {
+ while ( !( i & day ) && i <= static_cast<char>(Event::SUN) ) {
i <<= 1;
++dayOfWeek;
}
return dayOfWeek;
}
/*!
\internal
*/
int Event::monthDiff( const QDate& first, const QDate& second )
{
return ( second.year() - first.year() ) * 12 +
second.month() - first.month();
}
/*!
\internal
*/
QMap<int, QString> Event::toMap() const
{
QMap<int, QString> m;
if ( !description().isEmpty() )
m.insert( DatebookDescription, description() );