aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yaml-cpp/src/regeximpl.h
diff options
context:
space:
mode:
authorantonyzhilin <antonyzhilin@yandex-team.com>2024-07-05 19:56:10 +0300
committerantonyzhilin <antonyzhilin@yandex-team.com>2024-07-05 20:06:51 +0300
commit92272084057d874f12ce24f5a7950b867f7d50c2 (patch)
tree80fd973f61edfd5c1961c6dd024096b5f2822a5e /contrib/libs/yaml-cpp/src/regeximpl.h
parentada19b071f15ecd5d6784db9fd710f68bcccf310 (diff)
downloadydb-92272084057d874f12ce24f5a7950b867f7d50c2.tar.gz
feat contrib: update yaml-cpp to 0.8.0
6e6348bacf1f4cc2d24d90954c63619ba9bee1f0
Diffstat (limited to 'contrib/libs/yaml-cpp/src/regeximpl.h')
-rw-r--r--contrib/libs/yaml-cpp/src/regeximpl.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/contrib/libs/yaml-cpp/src/regeximpl.h b/contrib/libs/yaml-cpp/src/regeximpl.h
index 709124f0088..a742cdc3050 100644
--- a/contrib/libs/yaml-cpp/src/regeximpl.h
+++ b/contrib/libs/yaml-cpp/src/regeximpl.h
@@ -8,8 +8,8 @@
#endif
#include "stream.h"
-#include "stringsource.h"
#include "streamcharsource.h"
+#include "stringsource.h"
namespace YAML {
// query matches
@@ -106,9 +106,8 @@ inline int RegEx::MatchOpEmpty(const Source& source) const {
template <>
inline int RegEx::MatchOpEmpty<StringCharSource>(
const StringCharSource& source) const {
- return !source
- ? 0
- : -1; // the empty regex only is successful on the empty string
+ return !source ? 0 : -1; // the empty regex only is successful on the empty
+ // string
}
// MatchOperator
@@ -130,8 +129,8 @@ inline int RegEx::MatchOpRange(const Source& source) const {
// OrOperator
template <typename Source>
inline int RegEx::MatchOpOr(const Source& source) const {
- for (std::size_t i = 0; i < m_params.size(); i++) {
- int n = m_params[i].MatchUnchecked(source);
+ for (const RegEx& param : m_params) {
+ int n = param.MatchUnchecked(source);
if (n >= 0)
return n;
}
@@ -169,11 +168,11 @@ inline int RegEx::MatchOpNot(const Source& source) const {
template <typename Source>
inline int RegEx::MatchOpSeq(const Source& source) const {
int offset = 0;
- for (std::size_t i = 0; i < m_params.size(); i++) {
- int n = m_params[i].Match(source + offset); // note Match, not
- // MatchUnchecked because we
- // need to check validity after
- // the offset
+ for (const RegEx& param : m_params) {
+ int n = param.Match(source + offset); // note Match, not
+ // MatchUnchecked because we
+ // need to check validity after
+ // the offset
if (n == -1)
return -1;
offset += n;
@@ -181,6 +180,6 @@ inline int RegEx::MatchOpSeq(const Source& source) const {
return offset;
}
-}
+} // namespace YAML
#endif // REGEXIMPL_H_62B23520_7C8E_11DE_8A39_0800200C9A66