Permalink
Browse files

StringUtils: remove unnecessary range checks on unsigned value

  • Loading branch information...
1 parent 57529e8 commit f122e08648b515b61999729cb7c6dffbc8befbfb @Montellese Montellese committed Oct 3, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −4 xbmc/utils/StringUtils.cpp
@@ -129,16 +129,12 @@ string StringUtils::Left(const string &str, size_t count)
string StringUtils::Mid(const string &str, size_t first, size_t count /* = string::npos */)
{
- if (first < 0)
- first = 0;
-
if (first + count > str.size())
count = str.size() - first;
if (first > str.size())
return string();
- ASSERT(first >= 0);
ASSERT(first + count <= str.size());
return str.substr(first, count);

0 comments on commit f122e08

Please sign in to comment.