From f357d79176ffbde8947a8c9b039729273f7411cd Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 22 Feb 2016 20:46:27 +0100 Subject: Rename `PathMatcher::isMatching` to `PathMatcher::is_matching` Purely cosmetic change to match the overall naming scheme. --- change | 2 +- src/main.cc | 10 +++++----- src/tracking/path_matcher.cc | 2 +- src/tracking/path_matcher.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/change b/change index 8d68ee3..6fe7925 100755 --- a/change +++ b/change @@ -8,4 +8,4 @@ export CHANGE_LOG_IGNORE_PATTERN_PATH="$FILTER_PATH/$(basename $1).filter" LD_PRELOAD=libChangeLog.so eval "$@" cat $CHANGE_LOG_TARGET -rm -f $CHANGE_LOG_TARGET +rm -f $CHANGE_LOG_TARGET diff --git a/src/main.cc b/src/main.cc index 7e849fd..792c201 100644 --- a/src/main.cc +++ b/src/main.cc @@ -59,7 +59,7 @@ inline void track_write(const int fd) { if ( enabled && fd != *fd_guard && utility::is_regular_file(fd) ) { const auto path = utility::get_file_path(fd); - if ( !matcher->isMatching(path) ) { + if ( !matcher->is_matching(path) ) { tracker->track(path); } } @@ -67,7 +67,7 @@ inline void track_write(const int fd) { inline void track_write(const std::string& path) { if ( enabled && utility::is_regular_file(path.c_str()) ) { - if ( !matcher->isMatching(path) ) { + if ( !matcher->is_matching(path) ) { tracker->track(path); } } @@ -76,10 +76,10 @@ inline void track_write(const std::string& path) { inline void track_rename( const std::string& old_path, const std::string& new_path) { if ( enabled ) { - if ( !matcher->isMatching(old_path) ) { + if ( !matcher->is_matching(old_path) ) { tracker->track(old_path); - if ( !matcher->isMatching(new_path) ) { + if ( !matcher->is_matching(new_path) ) { logger->append("renamed '", old_path, "' to '", new_path, "'"); } } @@ -88,7 +88,7 @@ inline void track_rename( inline void track_remove(const std::string& path) { if ( enabled && utility::is_regular_file(path.c_str()) ) { - if ( !matcher->isMatching(path) ) { + if ( !matcher->is_matching(path) ) { logger->append("removed '", path, "'"); } } diff --git a/src/tracking/path_matcher.cc b/src/tracking/path_matcher.cc index c136565..da7917d 100644 --- a/src/tracking/path_matcher.cc +++ b/src/tracking/path_matcher.cc @@ -28,7 +28,7 @@ PathMatcher::PathMatcher(const std::string& source_file_path) { } } -bool PathMatcher::isMatching(const std::string& candidate) const { +bool PathMatcher::is_matching(const std::string& candidate) const { return std::any_of( this->patterns_.begin(), this->patterns_.end(), diff --git a/src/tracking/path_matcher.h b/src/tracking/path_matcher.h index 64337c0..966567e 100644 --- a/src/tracking/path_matcher.h +++ b/src/tracking/path_matcher.h @@ -11,7 +11,7 @@ class PathMatcher { PathMatcher() = default; PathMatcher(const std::string&); - bool isMatching(const std::string&) const; + bool is_matching(const std::string&) const; private: std::vector patterns_; -- cgit v1.2.3