Skip to content

Commit 9e152ba

Browse files
authored
Merge pull request #36957 from vespa-engine/arnej/rerun-format-4
re-run clang-format
2 parents ec2ace7 + ab7c164 commit 9e152ba

8 files changed

Lines changed: 19 additions & 20 deletions

File tree

searchcore/src/tests/proton/matching/matching_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ std::string make_same_element_stack_dump(const std::string& a1_term, const std::
189189

190190
std::string make_near_stack_dump(bool ordered, const std::string& term1, const std::string& term2) {
191191
QueryBuilder<ProtonNodeTypes> builder;
192-
constexpr int child_count = 2;
193-
constexpr size_t distance = 10;
194-
constexpr size_t num_negative_children = 0;
195-
constexpr size_t exclusion_distance = 0;
192+
constexpr int child_count = 2;
193+
constexpr size_t distance = 10;
194+
constexpr size_t num_negative_children = 0;
195+
constexpr size_t exclusion_distance = 0;
196196
if (ordered) {
197197
builder.addONear(child_count, distance, num_negative_children, exclusion_distance);
198198
} else {

vespalib/src/tests/util/deadline_test.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ class DeadlineTest : public ::testing::Test {
1414
public:
1515
DeadlineTest();
1616
~DeadlineTest() override;
17-
1817
};
1918

20-
DeadlineTest::DeadlineTest()
21-
: time(vespalib::steady_clock::now()) {
19+
DeadlineTest::DeadlineTest() : time(vespalib::steady_clock::now()) {
2220
}
2321

2422
DeadlineTest::~DeadlineTest() = default;

vespalib/src/vespa/vespalib/util/deadline.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
22

33
#include "deadline.h"
4+
45
#include "fake_deadline.h"
56

67
namespace vespalib {
@@ -14,4 +15,4 @@ const Deadline& Deadline::never() noexcept {
1415
return never_missed.get_deadline();
1516
}
1617

17-
}
18+
} // namespace vespalib

vespalib/src/vespa/vespalib/util/deadline.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#pragma once
44

55
#include "time.h"
6+
67
#include <atomic>
78

89
namespace vespalib {
@@ -30,7 +31,10 @@ class Deadline {
3031
/**
3132
* Returns whether the deadline is missed, i.e., whether the current time is after the deadline's time point.
3233
*/
33-
[[nodiscard]] bool is_missed() const noexcept { _missed = _missed || (get_time_ns() > _deadline); return _missed; }
34+
[[nodiscard]] bool is_missed() const noexcept {
35+
_missed = _missed || (get_time_ns() > _deadline);
36+
return _missed;
37+
}
3438
/**
3539
* Returns whether the deadline was missed, i.e., is_missed() was called after the deadline.
3640
*/
@@ -51,4 +55,4 @@ class Deadline {
5155
mutable bool _missed;
5256
};
5357

54-
}
58+
} // namespace vespalib

vespalib/src/vespa/vespalib/util/doom.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
#include "doom.h"
44

55
#include "fake_doom.h"
6+
67
#include <cassert>
78

89
namespace vespalib {
910

1011
Doom::Doom(const std::atomic<steady_time>& now_ref, steady_time soft_doom, steady_time hard_doom,
1112
bool explicit_soft_doom) noexcept
12-
: _now(now_ref),
13-
_softDoom(soft_doom),
14-
_hardDoom(hard_doom),
15-
_isExplicitSoftDoom(explicit_soft_doom) {
13+
: _now(now_ref), _softDoom(soft_doom), _hardDoom(hard_doom), _isExplicitSoftDoom(explicit_soft_doom) {
1614
}
1715

1816
Deadline Doom::make_deadline(steady_time point_of_deadline, Deadline::Type type) const noexcept {

vespalib/src/vespa/vespalib/util/doom.h

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

55
#include "deadline.h"
66
#include "time.h"
7+
78
#include <atomic>
89

910
namespace vespalib {

vespalib/src/vespa/vespalib/util/fake_deadline.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@
44

55
namespace vespalib {
66

7-
FakeDeadline::FakeDeadline() noexcept
8-
: FakeDeadline(1s) {
7+
FakeDeadline::FakeDeadline() noexcept : FakeDeadline(1s) {
98
}
109

1110
FakeDeadline::FakeDeadline(steady_time::duration time_to_deadline) noexcept
1211
: FakeDeadline(time_to_deadline, Deadline::Type::BUDGET) {
1312
}
1413

1514
FakeDeadline::FakeDeadline(steady_time::duration time_to_deadline, Deadline::Type type) noexcept
16-
: _time(steady_clock::now()),
17-
_deadline(_time, _time.load(std::memory_order_relaxed) + time_to_deadline, type) {
15+
: _time(steady_clock::now()), _deadline(_time, _time.load(std::memory_order_relaxed) + time_to_deadline, type) {
1816
}
1917

2018
FakeDeadline::~FakeDeadline() = default;

vespalib/src/vespa/vespalib/util/fake_doom.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
namespace vespalib {
66

77
FakeDoom::FakeDoom(steady_time::duration time_to_doom) noexcept
8-
: _time(steady_clock::now()),
9-
_doom(_time, _time.load(std::memory_order_relaxed) + time_to_doom) {
8+
: _time(steady_clock::now()), _doom(_time, _time.load(std::memory_order_relaxed) + time_to_doom) {
109
}
1110

1211
FakeDoom::~FakeDoom() = default;

0 commit comments

Comments
 (0)