Merged definition and initialization of conflictSeverity.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 Jan 2017 19:11:19 +0000 (20:11 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 Jan 2017 19:11:19 +0000 (20:11 +0100)
src/mvc/delegate.cpp

index 283f2c3..ebf4211 100644 (file)
@@ -64,8 +64,7 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
 
         // determine severity of conflict
         Favourite eventTimeConflict = event->timeConflict(); // cache value as event->timeConflict is expensive
-        enum ConflictSeverity {csNone, csWeak, csStrong} conflictSeverity;
-        conflictSeverity = csNone;
+        enum ConflictSeverity {csNone, csWeak, csStrong} conflictSeverity = csNone;
         switch (event->favourite()) {
             case Favourite_strong:
                 conflictSeverity = (eventTimeConflict == Favourite_strong) ? csStrong : csNone;