src: Improving consistency and correcting code style
As of this commit, all data structures can be directly constructed from
wire format.
This commit excludes full correction of code style in security/ and
tools/ndnsec*, which will be part of a different commit.
Change-Id: I121ac1f81948bc7468990df52cdefeb2988d91a1
Refs: #1403
diff --git a/src/util/regex/regex-component-matcher.hpp b/src/util/regex/regex-component-matcher.hpp
index 50cb8de..34bcba7 100644
--- a/src/util/regex/regex-component-matcher.hpp
+++ b/src/util/regex/regex-component-matcher.hpp
@@ -25,13 +25,13 @@
* @param backRefManager The back reference manager
* @param exact The flag to provide exact match
*/
- RegexComponentMatcher(const std::string& expr,
- ptr_lib::shared_ptr<RegexBackrefManager> backRefManager,
+ RegexComponentMatcher(const std::string& expr,
+ ptr_lib::shared_ptr<RegexBackrefManager> backRefManager,
bool exact = true);
-
+
virtual ~RegexComponentMatcher() {};
- virtual bool
+ virtual bool
match(const Name & name, const int & offset, const int &len = 1);
protected:
@@ -39,20 +39,20 @@
* @brief Compile the regular expression to generate the more matchers when necessary
* @returns true if compiling succeeds
*/
- virtual void
+ virtual void
compile();
-
+
private:
bool m_exact;
boost::regex m_componentRegex;
std::vector<ptr_lib::shared_ptr<RegexPseudoMatcher> > m_pseudoMatcher;
-
+
};
inline
-RegexComponentMatcher::RegexComponentMatcher (const std::string& expr,
- ptr_lib::shared_ptr<RegexBackrefManager> backRefManager,
+RegexComponentMatcher::RegexComponentMatcher (const std::string& expr,
+ ptr_lib::shared_ptr<RegexBackrefManager> backRefManager,
bool exact)
: RegexMatcher (expr, EXPR_COMPONENT, backRefManager),
m_exact(exact)
@@ -62,7 +62,7 @@
// _LOG_TRACE ("Exit RegexComponentMatcher Constructor: ");
}
-inline void
+inline void
RegexComponentMatcher::compile ()
{
// _LOG_TRACE ("Enter RegexComponentMatcher::compile");
@@ -78,7 +78,7 @@
m_pseudoMatcher.push_back(pMatcher);
m_backrefManager->pushRef(ptr_lib::static_pointer_cast<RegexMatcher>(pMatcher));
}
-
+
// _LOG_TRACE ("Exit RegexComponentMatcher::compile");
}
@@ -90,17 +90,17 @@
m_matchResult.clear();
- if("" == m_expr)
+ if ("" == m_expr)
{
m_matchResult.push_back(name.get(offset));
return true;
}
- if(true == m_exact)
+ if (true == m_exact)
{
boost::smatch subResult;
std::string targetStr = name.get(offset).toEscapedString();
- if(boost::regex_match(targetStr, subResult, m_componentRegex))
+ if (boost::regex_match(targetStr, subResult, m_componentRegex))
{
for (size_t i = 1; i < m_componentRegex.mark_count(); i++)
{