Skip to content

Commit a90c053

Browse files
committed
Move static function outside class
1 parent 975ac71 commit a90c053

File tree

1 file changed

+16
-16
lines changed
  • ext/test/w3c_tracecontext_test

1 file changed

+16
-16
lines changed

ext/test/w3c_tracecontext_test/main.cc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ namespace
4040
{
4141
static trace_api::propagation::HttpTraceContext propagator_format;
4242

43+
static bool equalsIgnoreCase(const std::string &str1, const std::string &str2)
44+
{
45+
if (str1.length() != str2.length())
46+
{
47+
return false;
48+
}
49+
for (size_t i = 0; i < str1.length(); i++)
50+
{
51+
if (tolower(str1[i]) != tolower(str2[i]))
52+
{
53+
return false;
54+
}
55+
}
56+
return true;
57+
}
58+
4359
class TextMapCarrierTest : public context::propagation::TextMapCarrier
4460
{
4561
public:
@@ -60,22 +76,6 @@ class TextMapCarrierTest : public context::propagation::TextMapCarrier
6076
headers_[std::string(key)] = std::string(value);
6177
}
6278

63-
static bool equalsIgnoreCase(const std::string &str1, const std::string &str2)
64-
{
65-
if (str1.length() != str2.length())
66-
{
67-
return false;
68-
}
69-
for (size_t i = 0; i < str1.length(); i++)
70-
{
71-
if (tolower(str1[i]) != tolower(str2[i]))
72-
{
73-
return false;
74-
}
75-
}
76-
return true;
77-
}
78-
7979
std::map<std::string, std::string> &headers_;
8080
};
8181

0 commit comments

Comments
 (0)