From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/common/logging/filter.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 55cc8888a..186e0b621 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -4,8 +4,8 @@ #include -#include "common/logging/filter.h" #include "common/logging/backend.h" +#include "common/logging/filter.h" #include "common/string_util.h" namespace Log { @@ -63,11 +63,11 @@ static Class GetClassByName(const It begin, const It end) { } bool Filter::ParseFilterRule(const std::string::const_iterator begin, - const std::string::const_iterator end) { + const std::string::const_iterator end) { auto level_separator = std::find(begin, end, ':'); if (level_separator == end) { LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", - std::string(begin, end).c_str()); + std::string(begin, end).c_str()); return false; } @@ -95,5 +95,4 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, bool Filter::CheckMessage(Class log_class, Level level) const { return static_cast(level) >= static_cast(class_levels[static_cast(log_class)]); } - } -- cgit v1.2.3 From ebdae19fd226104baec712b9da9939ff82ef3c3a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 21 Sep 2016 00:21:23 +0900 Subject: Remove empty newlines in #include blocks. This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. --- src/common/logging/filter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 186e0b621..9aa72cecc 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -2,10 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "common/logging/filter.h" #include - #include "common/logging/backend.h" -#include "common/logging/filter.h" #include "common/string_util.h" namespace Log { -- cgit v1.2.3 From 84fbbe26297652d994d203bde543ec252c2d801a Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Tue, 20 Sep 2016 23:52:38 -0700 Subject: Use negative priorities to avoid special-casing the self-include --- src/common/logging/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 9aa72cecc..12e5bb45d 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -2,9 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/logging/filter.h" #include #include "common/logging/backend.h" +#include "common/logging/filter.h" #include "common/string_util.h" namespace Log { -- cgit v1.2.3