@@ -24,7 +24,7 @@ enum class State {
24
24
PermanentlyFailed = 4 ,
25
25
};
26
26
27
- std::ostream& operator <<(std::ostream& out, State const & s );
27
+ std::ostream& operator <<(std::ostream& out, State const & state );
28
28
29
29
enum class Action {
30
30
/* No action necessary. */
@@ -39,7 +39,7 @@ enum class Action {
39
39
NotifyPermanentFailure = 4 ,
40
40
};
41
41
42
- std::ostream& operator <<(std::ostream& out, Action const & s );
42
+ std::ostream& operator <<(std::ostream& out, Action const & state );
43
43
44
44
/* *
45
45
* Computes the next (state, action) pair from an existing state and an HTTP
@@ -105,7 +105,7 @@ class RequestWorker {
105
105
/* *
106
106
* Returns true if the worker is available for delivery.
107
107
*/
108
- bool Available () const ;
108
+ [[nodiscard]] bool Available () const ;
109
109
110
110
/* *
111
111
* Passes an EventBatch to the worker for delivery. The delivery may be
@@ -136,10 +136,10 @@ class RequestWorker {
136
136
<< batch_->Target () << " with payload: "
137
137
<< batch_->Request ().Body ().value_or (" (no body)" );
138
138
139
- requester_.Request (
140
- batch_-> Request (), [this , handler](network::HttpResult result) {
141
- OnDeliveryAttempt (std::move ( result) , std::move (handler));
142
- });
139
+ requester_.Request (batch_-> Request (),
140
+ [this , handler](network::HttpResult const & result) {
141
+ OnDeliveryAttempt (result, std::move (handler));
142
+ });
143
143
return result.get ();
144
144
}
145
145
@@ -170,7 +170,8 @@ class RequestWorker {
170
170
171
171
Logger& logger_;
172
172
173
- void OnDeliveryAttempt (network::HttpResult request, ResultCallback cb);
173
+ void OnDeliveryAttempt (network::HttpResult const & request,
174
+ ResultCallback cb);
174
175
};
175
176
176
177
} // namespace launchdarkly::events
0 commit comments