Skip to content

Commit c6dcd3f

Browse files
committed
Use anonymous namespace for internal linkage
1 parent 1d6896d commit c6dcd3f

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

test/t/tags/test_tags_filter.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,31 @@ TEST_CASE("Tags filter") {
8181

8282
}
8383

84-
struct result_type {
84+
namespace {
8585

86-
int v = 0;
87-
bool b = false;
86+
struct result_type {
8887

89-
result_type() noexcept = default;
88+
int v = 0;
89+
bool b = false;
9090

91-
result_type(int v_, bool b_) noexcept :
92-
v(v_),
93-
b(b_) {
94-
}
91+
result_type() noexcept = default;
9592

96-
explicit operator bool() const noexcept {
97-
return b;
98-
}
93+
result_type(int v_, bool b_) noexcept :
94+
v(v_),
95+
b(b_) {
96+
}
9997

100-
}; // struct result_type
98+
explicit operator bool() const noexcept {
99+
return b;
100+
}
101101

102-
static bool operator==(const result_type& lhs, const result_type& rhs) noexcept {
103-
return lhs.v == rhs.v && lhs.b == rhs.b;
104-
}
102+
}; // struct result_type
103+
104+
bool operator==(const result_type& lhs, const result_type& rhs) noexcept {
105+
return lhs.v == rhs.v && lhs.b == rhs.b;
106+
}
107+
108+
} // anonymous namespace
105109

106110
TEST_CASE("TagsFilterBase") {
107111
osmium::memory::Buffer buffer{10240};

0 commit comments

Comments
 (0)