mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Remove CStr::ReverseFind
It was only used once. In this case a normal `std::string::find` can be used.
This commit is contained in:
@@ -264,16 +264,6 @@ double CStr::ToDouble() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
long CStr::ReverseFind(const CStr& str) const
|
||||
{
|
||||
size_t pos = rfind(str, length() );
|
||||
|
||||
if (pos != npos)
|
||||
return static_cast<long>(pos);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Lowercase and uppercase
|
||||
CStr CStr::LowerCase() const
|
||||
{
|
||||
|
||||
@@ -131,16 +131,6 @@ public:
|
||||
**/
|
||||
double ToDouble() const;
|
||||
|
||||
/**
|
||||
* Search the CStr for another string.
|
||||
* The search is case-sensitive.
|
||||
*
|
||||
* @param const CStr & str reference to the search string
|
||||
* @return long offset into the CStr of the last occurrence of the search string
|
||||
* -1 if the search string is not found
|
||||
**/
|
||||
long ReverseFind(const CStr& str) const;
|
||||
|
||||
/**
|
||||
* Make a copy of the CStr in lower-case.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user