MCPcopy Create free account
hub / github.com/FastLED/FastLED / replace

Function replace

src/fl/stl/algorithm.h:245–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244template <typename Iterator, typename T>
245void replace(Iterator first, Iterator last, const T& old_value, const T& new_value) FL_NOEXCEPT {
246 while (first != last) {
247 if (*first == old_value) {
248 *first = new_value;
249 }
250 ++first;
251 }
252}
253
254template <typename Iterator, typename UnaryPredicate, typename T>
255void replace_if(Iterator first, Iterator last, UnaryPredicate pred, const T& new_value) FL_NOEXCEPT {

Callers 4

fs_stub.hppFile · 0.85
_merge_env_sectionsFunction · 0.85
_apply_global_envMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected