More static analysis fixes

This commit is contained in:
SChernykh
2020-12-08 16:05:58 +01:00
parent d5f84a813d
commit 83d152f557
14 changed files with 40 additions and 33 deletions

View File

@@ -125,7 +125,7 @@ std::vector<xmrig::String> xmrig::String::split(char sep) const
for (pos = 0; pos < m_size; ++pos) {
if (m_data[pos] == sep) {
if ((pos - start) > 0) {
if (pos > start) {
out.emplace_back(m_data + start, pos - start);
}
@@ -133,7 +133,7 @@ std::vector<xmrig::String> xmrig::String::split(char sep) const
}
}
if ((pos - start) > 0) {
if (pos > start) {
out.emplace_back(m_data + start, pos - start);
}