MCPcopy Create free account
hub / github.com/DFHack/dfhack / showEntry

Method showEntry

plugins/listcolumn.h:147–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 virtual bool showEntry(const ListEntry<T> *entry, const vector<string> &search_tokens)
148 {
149 if (!search_tokens.empty())
150 {
151 string item_string = to_search_normalized(entry->text);
152 for (auto si = search_tokens.begin(); si != search_tokens.end(); si++)
153 {
154 if (!si->empty() && item_string.find(*si) == string::npos &&
155 entry->keywords.find(*si) == string::npos)
156 {
157 return false;
158 }
159 }
160 }
161 return true;
162 }
163
164 void filterDisplay()
165 {

Callers

nothing calls this directly

Calls 5

to_search_normalizedFunction · 0.85
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected