mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-24 17:37:53 +02:00
Merge branch 'stable-gcc611-fix-compile' of https://github.com/xavery/rivendell into xavery-stable-gcc611-fix-compile
This commit is contained in:
commit
f35263d24c
@ -623,9 +623,10 @@ unsigned RDCartSlot::SelectCart(const QString &svcname,unsigned msecs)
|
|||||||
"(SERVICE=\""+RDEscapeString(svcname)+"\")";
|
"(SERVICE=\""+RDEscapeString(svcname)+"\")";
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
while(q->next()) {
|
while(q->next()) {
|
||||||
if(::abs(msecs-q->value(1).toInt())<diff) {
|
int cur_diff = msecs-q->value(1).toInt();
|
||||||
|
if(::abs(cur_diff)<diff) {
|
||||||
cartnum=q->value(0).toUInt();
|
cartnum=q->value(0).toUInt();
|
||||||
diff=::abs(msecs-q->value(1).toInt());
|
diff=::abs(cur_diff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete q;
|
delete q;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user