Optimize calls to std::string::find() and friends for a single char.
authorVincent Rabaud <vrabaud@google.com>
Wed, 16 Dec 2020 15:06:58 +0000 (16:06 +0100)
committerVincent Rabaud <vrabaud@google.com>
Thu, 17 Dec 2020 08:39:23 +0000 (09:39 +0100)
commit8391a2360080571d15e1b4ad5dc383672105750b
tree194680b9f423681074788213a8c98f338c0310c9
parentd159417474e8d16e1314c696ccf9f4a910c633b4
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
modules/core/test/test_misc.cpp
modules/dnn/src/darknet/darknet_io.cpp
modules/dnn/src/tensorflow/tf_importer.cpp