code cleanup

This commit is contained in:
2018-11-30 16:14:45 +01:00
parent 4dd765b341
commit adbdc93315
8 changed files with 60 additions and 42 deletions

View File

@@ -1,10 +1,10 @@
#include "qvectorhelper.h"
#include <qvector.h>
int QVectorHelper::minSec1;
int QVectorHelper::minSec2;
int QVectorHelper::minSec3;
int QVectorHelper::minTrackTime;
int QVectorHelper::minSec1; // set by database
int QVectorHelper::minSec2; // set by database
int QVectorHelper::minSec3; // set by database
int QVectorHelper::minTrackTime; // set by database
QVectorHelper::QVectorHelper() {
}
@@ -46,7 +46,7 @@ int QVectorHelper::getMinSec1(const QVector<QVector<int>> x) {
return min;
}
int QVectorHelper::getMinSec2(const QVector<QVector<int>> x) {
int min;
int min = 9999;
if (x.size() > 0) {
if (x.at(0).size() >= 3) {
if (x.at(0).at(1) >= minSec2) {
@@ -73,7 +73,7 @@ int QVectorHelper::getMinSec2(const QVector<QVector<int>> x) {
return min;
}
int QVectorHelper::getMinSec3(const QVector<QVector<int>> x) {
int min;
int min = 9999;
if (x.size() > 0) {
if (x.at(0).size() >= 3) {
if (x.at(0).at(2) >= minSec3) {
@@ -101,7 +101,7 @@ int QVectorHelper::getMinSec3(const QVector<QVector<int>> x) {
}
int QVectorHelper::getMin(const QVector<QVector<int>> x) {
int min;
int min = 9999;
if (x.size() > 0) {
if (x.at(0).size() >= 3) {
if (getCurTime(x.at(0)) >= minTrackTime &&