Commit 06951f52 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Simplify >= 0 ifs for unsigned

parent fa813adc
......@@ -236,9 +236,7 @@ byte_array ustring::to_utf8() const
return byte_array();
}
}
if (str_len_left >= 0) {
str.resize(str.size() - str_len_left);
}
str.resize(str.size() - str_len_left);
return str;
}
......@@ -287,9 +285,7 @@ ustring ustring::from_utf8(const char *str, int len)
return ustring();
}
}
if (ret_len_left >= 0) {
ret.resize(ret.size() - ret_len_left);
}
ret.resize(ret.size() - ret_len_left);
return ret;
}
......
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