MCPcopy Create free account
hub / github.com/ElementsProject/elements / negated

Method negated

src/util/settings.cpp:244–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242bool SettingsSpan::empty() const { return size == 0 || last_negated(); }
243bool SettingsSpan::last_negated() const { return size > 0 && data[size - 1].isFalse(); }
244size_t SettingsSpan::negated() const
245{
246 for (size_t i = size; i > 0; --i) {
247 if (data[i - 1].isFalse()) return i; // Return number of negated values (position of last false value)
248 }
249 return 0;
250}
251
252} // namespace util

Callers 2

GetSettingsListFunction · 0.80
ReadConfigFilesMethod · 0.80

Calls 1

isFalseMethod · 0.80

Tested by

no test coverage detected