Skip to content

Commit c7ce2be

Browse files
committed
clang-format
1 parent 6dfbf75 commit c7ce2be

24 files changed

+39
-49
lines changed

src/datadog/collector_response.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
namespace datadog {
44
namespace tracing {
55

6-
std::string CollectorResponse::key(StringView service,
7-
StringView environment) {
6+
std::string CollectorResponse::key(StringView service, StringView environment) {
87
std::string result;
98
result += "service:";
109
result += service;

src/datadog/collector_response.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@
1414
// information.
1515

1616
#include <string>
17-
#include "string_view.h"
1817
#include <unordered_map>
1918

2019
#include "rate.h"
20+
#include "string_view.h"
2121

2222
namespace datadog {
2323
namespace tracing {
2424

2525
struct CollectorResponse {
26-
static std::string key(StringView service,
27-
StringView environment);
26+
static std::string key(StringView service, StringView environment);
2827
static const std::string key_of_default_rate;
2928
std::unordered_map<std::string, Rate> sample_rate_by_key;
3029
};

src/datadog/curl.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <list>
1212
#include <memory>
1313
#include <mutex>
14-
#include "string_view.h"
1514
#include <thread>
1615
#include <unordered_map>
1716
#include <unordered_set>
@@ -22,6 +21,7 @@
2221
#include "json.hpp"
2322
#include "logger.h"
2423
#include "parse_util.h"
24+
#include "string_view.h"
2525

2626
namespace datadog {
2727
namespace tracing {
@@ -72,9 +72,8 @@ class CurlImpl {
7272
explicit HeaderReader(
7373
std::unordered_map<std::string, std::string> *response_headers_lower);
7474
std::optional<StringView> lookup(StringView key) const override;
75-
void visit(
76-
const std::function<void(StringView key, StringView value)>
77-
&visitor) const override;
75+
void visit(const std::function<void(StringView key, StringView value)>
76+
&visitor) const override;
7877
};
7978

8079
void run();
@@ -439,8 +438,7 @@ CurlImpl::HeaderReader::HeaderReader(
439438
std::unordered_map<std::string, std::string> *response_headers_lower)
440439
: response_headers_lower_(response_headers_lower) {}
441440

442-
std::optional<StringView> CurlImpl::HeaderReader::lookup(
443-
StringView key) const {
441+
std::optional<StringView> CurlImpl::HeaderReader::lookup(StringView key) const {
444442
buffer_.clear();
445443
std::transform(key.begin(), key.end(), std::back_inserter(buffer_),
446444
&to_lower);
@@ -453,8 +451,8 @@ std::optional<StringView> CurlImpl::HeaderReader::lookup(
453451
}
454452

455453
void CurlImpl::HeaderReader::visit(
456-
const std::function<void(StringView key, StringView value)>
457-
&visitor) const {
454+
const std::function<void(StringView key, StringView value)> &visitor)
455+
const {
458456
for (const auto &[key, value] : *response_headers_lower_) {
459457
visitor(key, value);
460458
}

src/datadog/datadog_agent_config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Expected<HTTPClient::URL> DatadogAgentConfig::parse(StringView input) {
2525

2626
const StringView scheme = range(input.begin(), after_scheme);
2727
const StringView supported[] = {"http", "https", "unix", "http+unix",
28-
"https+unix"};
28+
"https+unix"};
2929
const auto found =
3030
std::find(std::begin(supported), std::end(supported), scheme);
3131
if (found == std::end(supported)) {

src/datadog/datadog_agent_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#include <chrono>
1515
#include <memory>
1616
#include <string>
17-
#include "string_view.h"
1817
#include <variant>
1918

2019
#include "expected.h"
2120
#include "http_client.h"
21+
#include "string_view.h"
2222

2323
namespace datadog {
2424
namespace tracing {

src/datadog/dict_reader.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <functional>
88
#include <optional>
9+
910
#include "string_view.h"
1011

1112
namespace datadog {
@@ -17,13 +18,12 @@ class DictReader {
1718

1819
// Return the value at the specified `key`, or return `std::nullopt` if there
1920
// is no value at `key`.
20-
virtual std::optional<StringView> lookup(
21-
StringView key) const = 0;
21+
virtual std::optional<StringView> lookup(StringView key) const = 0;
2222

2323
// Invoke the specified `visitor` once for each key/value pair in this object.
2424
virtual void visit(
25-
const std::function<void(StringView key, StringView value)>&
26-
visitor) const = 0;
25+
const std::function<void(StringView key, StringView value)>& visitor)
26+
const = 0;
2727
};
2828

2929
} // namespace tracing

src/datadog/environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
// `lookup` retrieves the value of `Variable` in the environment.
1616

1717
#include <optional>
18-
#include "string_view.h"
1918

2019
#include "json_fwd.hpp"
20+
#include "string_view.h"
2121

2222
namespace datadog {
2323
namespace tracing {

src/datadog/error.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include <iosfwd>
1414
#include <string>
15+
1516
#include "string_view.h"
1617

1718
namespace datadog {

src/datadog/logger.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
#include <functional>
4343
#include <ostream>
44+
4445
#include "string_view.h"
4546

4647
namespace datadog {

src/datadog/msgpack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <cstddef>
1515
#include <cstdint>
1616
#include <string>
17-
#include "string_view.h"
1817
#include <utility>
1918

2019
#include "expected.h"
20+
#include "string_view.h"
2121

2222
namespace datadog {
2323
namespace tracing {

0 commit comments

Comments
 (0)