mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #937 Resolved clazy warnings: unnecessary memory allocation.
This commit is contained in:
@@ -66,10 +66,10 @@ namespace BlackMisc
|
||||
|
||||
if (ts.contains(":") && (ts.length() == 8 || ts.length() == 5))
|
||||
{
|
||||
const int hour = ts.mid(0, 2).toInt();
|
||||
const int minute = ts.mid(3, 2).toInt();
|
||||
const int hour = ts.midRef(0, 2).toInt();
|
||||
const int minute = ts.midRef(3, 2).toInt();
|
||||
int second = 0;
|
||||
if (ts.length() == 8) second = ts.mid(6, 2).toInt();
|
||||
if (ts.length() == 8) second = ts.midRef(6, 2).toInt();
|
||||
(*this) = CTime(hour, minute, second);
|
||||
|
||||
// fix sign if required
|
||||
|
||||
Reference in New Issue
Block a user