WSL/SLF GitLab Repository

Commit 01a54280 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Adding some type casting (to fix warnings)

parent c29c8b14
......@@ -344,7 +344,7 @@ int Number::getPrecisionOfNumber(const QString &str_number) const
{
const QStringList dec( str_number.split(QRegularExpression("[,.]")) );
if (dec.size() > 1) //there's a decimal sign
return dec.at(1).length();
return static_cast<int>( dec.at(1).length() );
return 0; //integer
}
......
......@@ -50,7 +50,7 @@ bool splitRepKey(const QString &full_key, QString &pre, int &extracted_no, QStri
bool found = false;
if (rightmost) {
for (int rpos = full_key.length() - 1; rpos > -1; --rpos) { //start anchor at last char and iterate to 1st
for (int rpos = static_cast<int>(full_key.length()) - 1; rpos > -1; --rpos) { //start anchor at last char and iterate to 1st
for (int len = 1; len <= rpos + 1; ++len) { //1 to max length of candidate (start of word to current anchor)
const QString candidate( full_key.mid(rpos - len + 1, len));
bool success;
......
Supports Markdown
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