refs #937 Resolved clazy warnings: unnecessary memory allocation.

This commit is contained in:
Mathew Sutcliffe
2017-04-17 00:03:33 +01:00
parent fce1513dae
commit b7f69c6887
26 changed files with 52 additions and 51 deletions

View File

@@ -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