summaryrefslogtreecommitdiff
path: root/library/backend/event.cpp
Unidiff
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
@@ -390,25 +390,25 @@ int Event::occurrence( const QDate& date )
390 // calculates the number of occurrances of this day of the 390 // calculates the number of occurrances of this day of the
391 // week till the given date (e.g 3rd Wednesday of the month) 391 // week till the given date (e.g 3rd Wednesday of the month)
392 return ( date.day() - 1 ) / 7 + 1; 392 return ( date.day() - 1 ) / 7 + 1;
393} 393}
394 394
395/*! 395/*!
396 \internal 396 \internal
397*/ 397*/
398int Event::dayOfWeek( char day ) 398int Event::dayOfWeek( char day )
399{ 399{
400 int dayOfWeek = 1; 400 int dayOfWeek = 1;
401 char i = Event::MON; 401 char i = Event::MON;
402 while ( !( i & day ) && i <= Event::SUN ) { 402 while ( !( i & day ) && i <= static_cast<char>(Event::SUN) ) {
403 i <<= 1; 403 i <<= 1;
404 ++dayOfWeek; 404 ++dayOfWeek;
405 } 405 }
406 return dayOfWeek; 406 return dayOfWeek;
407} 407}
408 408
409/*! 409/*!
410 \internal 410 \internal
411*/ 411*/
412int Event::monthDiff( const QDate& first, const QDate& second ) 412int Event::monthDiff( const QDate& first, const QDate& second )
413{ 413{
414 return ( second.year() - first.year() ) * 12 + 414 return ( second.year() - first.year() ) * 12 +