Updates base_attr based on overrides in new_attr.
| 349 | |
| 350 | // Updates base_attr based on overrides in new_attr. |
| 351 | void MergeAttr(ApiDef::Attr* base_attr, const ApiDef::Attr& new_attr) { |
| 352 | if (!new_attr.rename_to().empty()) { |
| 353 | base_attr->set_rename_to(new_attr.rename_to()); |
| 354 | } |
| 355 | if (new_attr.has_default_value()) { |
| 356 | *base_attr->mutable_default_value() = new_attr.default_value(); |
| 357 | } |
| 358 | if (!new_attr.description().empty()) { |
| 359 | base_attr->set_description(new_attr.description()); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | // Updates base_api_def based on overrides in new_api_def. |
| 364 | Status MergeApiDefs(ApiDef* base_api_def, const ApiDef& new_api_def) { |
no test coverage detected