Skip to content
Permalink
Browse files

A few clang-tidy tweaks (part 2).

Change-Id: I88aa90f27e9d6cc3723da3b98789357dd472e61c
  • Loading branch information...
svenpanne committed May 17, 2019
1 parent 1bd54bf commit 8a15ec58ee282b2efa2074a3cea897b3c403362a
Showing with 8 additions and 3 deletions.
  1. +2 −0 .clang-tidy
  2. +2 −2 livestatus/src/RegExp.cc
  3. +4 −1 livestatus/src/StringUtils.cc
@@ -52,6 +52,8 @@ Checks: '*,-android-cloexec-fopen,-android-cloexec-open,-cert-env33-c,-cert-err3
CheckOptions:
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '1'
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: readability-identifier-naming.MemberCase
value: 'lower_case'
- key: readability-identifier-naming.ProtectedMemberSuffix
@@ -92,11 +92,11 @@ class RegExp::Impl {
std::regex_constants::format_sed);
}

bool match(const std::string &str) const {
[[nodiscard]] bool match(const std::string &str) const {
return regex_match(str, regex_);
}

bool search(const std::string &str) const {
[[nodiscard]] bool search(const std::string &str) const {
return regex_search(str, regex_);
}

@@ -103,6 +103,9 @@ std::string ipv4ToString(in_addr_t ipv4_address) {
return addr_buf;
}

std::string portToString(in_port_t port) { return std::to_string(ntohs(port)); }
std::string portToString(in_port_t port) {
// NOLINTNEXTLINE(readability-isolate-declaration)
return std::to_string(ntohs(port));
}
#endif
} // namespace mk

0 comments on commit 8a15ec5

Please sign in to comment.
You can’t perform that action at this time.