| 185 | } |
| 186 | |
| 187 | bool |
| 188 | renew_fact(FactVec& facts, const Fact* new_fact) |
| 189 | { |
| 190 | size_t i; |
| 191 | for (i=0; i<facts.size(); i++) { |
| 192 | if (new_fact->is_related(*facts[i])) { |
| 193 | if (new_fact->equal(*facts[i])) { |
| 194 | return false; |
| 195 | } |
| 196 | facts[i] = new_fact; |
| 197 | break; |
| 198 | } |
| 199 | } |
| 200 | // if not found, append the new fact |
| 201 | if (i==facts.size()) { |
| 202 | facts.push_back(new_fact); |
| 203 | } |
| 204 | return true; |
| 205 | } |
| 206 | |
| 207 | bool |
| 208 | merge_facts(FactVec& facts, const FactVec& new_facts) |
no test coverage detected