mirror of
https://github.com/opencv/opencv.git
synced 2026-09-12 21:37:09 -05:00
Optimize calls to std::string::find() and friends for a single char.
The character literal overload is more efficient. More info at: http://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html
This commit is contained in:
@@ -189,7 +189,7 @@ TEST(Core_OutputArrayCreate, _13772)
|
||||
TEST(Core_String, find_last_of__with__empty_string)
|
||||
{
|
||||
cv::String s;
|
||||
size_t p = s.find_last_of("q", 0);
|
||||
size_t p = s.find_last_of('q', 0);
|
||||
// npos is not exported: EXPECT_EQ(cv::String::npos, p);
|
||||
EXPECT_EQ(std::string::npos, p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user