| 345 | } |
| 346 | |
| 347 | void compare_functions(const std::vector<t_function*>& newFunctionList, const std::vector<t_function*>& oldFunctionList) |
| 348 | { |
| 349 | std::map<std::string, t_function*> newFunctionMap; |
| 350 | std::map<std::string, t_function*>::iterator newFunctionMapIt; |
| 351 | for(auto newFunctionIt : newFunctionList) |
| 352 | { |
| 353 | newFunctionMap[newFunctionIt->get_name()] = newFunctionIt; |
| 354 | } |
| 355 | |
| 356 | for(auto oldFunctionIt : oldFunctionList) |
| 357 | { |
| 358 | newFunctionMapIt = newFunctionMap.find(oldFunctionIt->get_name()); |
| 359 | if(newFunctionMapIt == newFunctionMap.end()) |
| 360 | { |
| 361 | thrift_audit_failure("New Thrift File has missing function %s\n",oldFunctionIt->get_name().c_str()); |
| 362 | continue; |
| 363 | } |
| 364 | else |
| 365 | { |
| 366 | //Function is found in both thrift files. Compare return type and argument list |
| 367 | compare_single_function(newFunctionMapIt->second, oldFunctionIt); |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | } |
| 372 | |
| 373 | void compare_services(const std::vector<t_service*>& newServices, const std::vector<t_service*>& oldServices) |
| 374 | { |
no test coverage detected