mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 10:20:35 +03:00
Cosmetics: coding style
This commit is contained in:
@@ -31,13 +31,13 @@ namespace Utils {
|
||||
|
||||
class SMatch {
|
||||
public:
|
||||
SMatch()
|
||||
: m_match(), m_offset(0)
|
||||
{}
|
||||
SMatch() :
|
||||
m_match(),
|
||||
m_offset(0) { }
|
||||
|
||||
SMatch(const std::string &match, size_t offset)
|
||||
: m_match(match), m_offset(offset)
|
||||
{}
|
||||
SMatch(const std::string &match, size_t offset) :
|
||||
m_match(match),
|
||||
m_offset(offset) { }
|
||||
|
||||
const std::string& str() const { return m_match; }
|
||||
size_t offset() const { return m_offset; }
|
||||
@@ -47,6 +47,7 @@ class SMatch {
|
||||
size_t m_offset;
|
||||
};
|
||||
|
||||
|
||||
class Regex {
|
||||
public:
|
||||
explicit Regex(const std::string& pattern_);
|
||||
@@ -66,14 +67,17 @@ class Regex {
|
||||
pcre_extra *m_pce = NULL;
|
||||
};
|
||||
|
||||
|
||||
static inline int regex_search(const std::string& s, SMatch *match, const Regex& regex) {
|
||||
return regex.search(s, match);
|
||||
}
|
||||
|
||||
|
||||
static inline int regex_search(const std::string& s, const Regex& regex) {
|
||||
return regex.search(s);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Utils
|
||||
} // namespace modsecurity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user