File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,13 @@ namespace wsrep
253
253
std::unique_ptr<option_value> value,
254
254
std::unique_ptr<option_value> default_value, int flags);
255
255
256
- void for_each (const std::function<void (option*)>& fn);
256
+ /* *
257
+ * Invoke the given function with each provider option
258
+ * as argument.
259
+ *
260
+ * @param fn Function to call for each option
261
+ */
262
+ void for_each (const std::function<void (option*)>& fn) const ;
257
263
258
264
private:
259
265
using options_map = std::map<std::string, std::unique_ptr<option>>;
Original file line number Diff line number Diff line change @@ -161,9 +161,10 @@ enum wsrep::provider::status wsrep::provider_options::set_default(
161
161
return wsrep::provider::success;
162
162
}
163
163
164
- void wsrep::provider_options::for_each (const std::function<void (option*)>& fn)
164
+ void wsrep::provider_options::for_each (
165
+ const std::function<void (option*)>& fn) const
165
166
{
166
- std::for_each (
167
- options_. begin (), options_. end (),
168
- [&fn]( const options_map::value_type& opt) { fn (opt.second .get ()); });
167
+ std::for_each (options_. begin (), options_. end (),
168
+ [&fn]( const options_map::value_type& opt)
169
+ { fn (opt.second .get ()); });
169
170
}
You can’t perform that action at this time.
0 commit comments