mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 07:14:46 +02:00
Mac (clang) compile warning fix
This commit is contained in:
@@ -690,14 +690,14 @@ typedef std::basic_string<char, i_char_traits<char> > istring;
|
|||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
int isubstr(const T& str, const T& sought)
|
std::size_t isubstr(const T& str, const T& sought)
|
||||||
{
|
{
|
||||||
typename T::const_iterator it = std::search(str.begin(), str.end(),
|
typename T::const_iterator it = std::search(str.begin(), str.end(),
|
||||||
sought.begin(), sought.end(),
|
sought.begin(), sought.end(),
|
||||||
i_char_traits<typename T::value_type>::eq);
|
i_char_traits<typename T::value_type>::eq);
|
||||||
|
|
||||||
if (it != str.end()) return it - str.begin();
|
if (it != str.end()) return it - str.begin();
|
||||||
else return T::npos;
|
else return static_cast<std::size_t>(T::npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user