OSDN Git Service

avoid temporary in QDateTimeEditPrivate::stepBy()
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 22 Jun 2020 17:58:02 +0000 (17:58 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 22 Jun 2020 17:58:02 +0000 (17:58 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/widgets/qdatetimeedit.cpp

index 34544ad..6cc2447 100644 (file)
@@ -1897,8 +1897,7 @@ QDateTime QDateTimeEditPrivate::stepBy(int sectionIndex, int steps, bool test) c
         }
     }
 
-    const QDateTime ret = bound(v, value, steps).toDateTime().toTimeSpec(spec);
-    return ret;
+    return bound(v, value, steps).toDateTime().toTimeSpec(spec);
 }
 
 /*!