Commit d523f5ea authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

Fixed warnings

parent 5e7a95da
...@@ -198,7 +198,7 @@ protected: ...@@ -198,7 +198,7 @@ protected:
bool tryBind ( bool&& b) { set(QCborValue( b )); return true; } bool tryBind ( bool&& b) { set(QCborValue( b )); return true; }
bool tryBind ( float&& d) { set(QCborValue(double(d))); return true; } bool tryBind ( float&& d) { set(QCborValue(double(d))); return true; }
bool tryBind ( double&& d) { set(QCborValue( d )); return true; } bool tryBind ( double&& d) { set(QCborValue( d )); return true; }
bool tryBind ( quint64&& n) { if (std::numeric_limits<qint64>::max()<n) { _reportError(qBindExpectedSmallerNumber); return false; } bool tryBind ( quint64&& n) { if (quint64(std::numeric_limits<qint64>::max())<n) { _reportError(qBindExpectedSmallerNumber); return false; }
set(QCborValue(qint64(n))); return true; } set(QCborValue(qint64(n))); return true; }
bool tryBind ( qint64&& n) { set(QCborValue( n )); return true; } bool tryBind ( qint64&& n) { set(QCborValue( n )); return true; }
bool tryBind ( QByteArray&& s) { set(QCborValue( s )); return true; } bool tryBind ( QByteArray&& s) { set(QCborValue( s )); return true; }
......
...@@ -236,6 +236,7 @@ protected: ...@@ -236,6 +236,7 @@ protected:
if (I==(d+1)) { if (I==(d+1)) {
return tryBind(QString::fromUtf8(ba.data(), ba.size())); return tryBind(QString::fromUtf8(ba.data(), ba.size()));
} }
return true;
} }
else { else {
if (T==d && parent.isValid()) { // case of a tree, even if hidden() if (T==d && parent.isValid()) { // case of a tree, even if hidden()
...@@ -556,6 +557,7 @@ protected: ...@@ -556,6 +557,7 @@ protected:
} }
return true; return true;
} }
else { return true; }
} }
else if (is(R)) { else if (is(R)) {
row++; // mandatory after tryRecord() row++; // mandatory after tryRecord()
...@@ -567,6 +569,7 @@ protected: ...@@ -567,6 +569,7 @@ protected:
_reportError(qBindIgnoredItemName); _reportError(qBindIgnoredItemName);
return true; return true;
} }
else { return true; }
} }
else { Q_ASSERT(I<=d); else { Q_ASSERT(I<=d);
if (hidden()) { if (hidden()) {
......
...@@ -176,6 +176,7 @@ struct PersonsTable { ...@@ -176,6 +176,7 @@ struct PersonsTable {
ids.clear(); ids.clear();
return flatten(persons, v.sequence()); return flatten(persons, v.sequence());
} }
else { Q_ASSERT_X(!v, Q_FUNC_INFO, "Unsupported v->mode()"); return v.null(); }
} }
private: private:
QStack<int> parentIds; QStack<int> parentIds;
...@@ -234,6 +235,7 @@ private: ...@@ -234,6 +235,7 @@ private:
return std::move(s); return std::move(s);
} }
else { Q_ASSERT_X(!s, Q_FUNC_INFO, "Unsupported v->mode()"); return std::move(s); }
} }
QSequence flatten(QList<Person>& ps, QSequence&& s) { QSequence flatten(QList<Person>& ps, QSequence&& s) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment