| 114 | } |
| 115 | |
| 116 | std::string PrefilterTree::NodeString(Prefilter* node) const { |
| 117 | // Adding the operation disambiguates AND/OR/atom nodes. |
| 118 | std::string s = StringPrintf("%d", node->op()) + ":"; |
| 119 | if (node->op() == Prefilter::ATOM) { |
| 120 | s += node->atom(); |
| 121 | } else { |
| 122 | for (size_t i = 0; i < node->subs()->size(); i++) { |
| 123 | if (i > 0) |
| 124 | s += ','; |
| 125 | s += StringPrintf("%d", (*node->subs())[i]->unique_id()); |
| 126 | } |
| 127 | } |
| 128 | return s; |
| 129 | } |
| 130 | |
| 131 | bool PrefilterTree::KeepNode(Prefilter* node) const { |
| 132 | if (node == NULL) |
nothing calls this directly
no test coverage detected