MCPcopy Create free account
hub / github.com/assimp/assimp / apply_predicate_boolean

Method apply_predicate_boolean

contrib/pugixml/src/pugixml.cpp:10259–10283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10257 }
10258
10259 static void apply_predicate_boolean(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)
10260 {
10261 assert(ns.size() >= first);
10262 assert(expr->rettype() != xpath_type_number);
10263
10264 size_t i = 1;
10265 size_t size = ns.size() - first;
10266
10267 xpath_node* last = ns.begin() + first;
10268
10269 // remove_if... or well, sort of
10270 for (xpath_node* it = last; it != ns.end(); ++it, ++i)
10271 {
10272 xpath_context c(*it, i, size);
10273
10274 if (expr->eval_boolean(c, stack))
10275 {
10276 *last++ = *it;
10277
10278 if (once) break;
10279 }
10280 }
10281
10282 ns.truncate(last);
10283 }
10284
10285 static void apply_predicate_number(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack, bool once)
10286 {

Callers

nothing calls this directly

Calls 6

rettypeMethod · 0.80
eval_booleanMethod · 0.80
truncateMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected