mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Return a default-constructed QString instead of implicitly converting an empty string literal.
This commit is contained in:
@@ -688,7 +688,7 @@ namespace BlackCore
|
||||
|
||||
QString CDatabaseReader::dateTimeToDbLatestTs(const QDateTime &ts)
|
||||
{
|
||||
if (!ts.isValid()) { return ""; }
|
||||
if (!ts.isValid()) { return {}; }
|
||||
return ts.toUTC().toString(Qt::ISODate);
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ namespace BlackCore
|
||||
|
||||
QString CDatabaseReader::queryLatestTimestamp(const QDateTime &ts)
|
||||
{
|
||||
if (!ts.isValid()) return "";
|
||||
if (!ts.isValid()) return {};
|
||||
const QString q = parameterLatestTimestamp() + "=" + dateTimeToDbLatestTs(ts);
|
||||
return q;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user