| 1847 | } |
| 1848 | |
| 1849 | TypeIdentifier replace_object(const TypeIdentifier& typeId) |
| 1850 | { |
| 1851 | TypeObject copy(lookup_.get_type_object(typeId)); |
| 1852 | bool replaced = false; |
| 1853 | |
| 1854 | switch (copy.kind) { |
| 1855 | case EK_MINIMAL: |
| 1856 | replaced = replace_mcto(copy.minimal); |
| 1857 | break; |
| 1858 | case EK_COMPLETE: |
| 1859 | replaced = replace_mcto(copy.complete); |
| 1860 | break; |
| 1861 | default: |
| 1862 | return TypeIdentifier::None; |
| 1863 | } |
| 1864 | |
| 1865 | if (!replaced) { |
| 1866 | return TypeIdentifier::None; |
| 1867 | } |
| 1868 | |
| 1869 | const TypeIdentifier copyId = makeTypeIdentifier(copy); |
| 1870 | new_types_[copyId] = copy; |
| 1871 | return copyId; |
| 1872 | } |
| 1873 | }; |
| 1874 | } |
| 1875 |
no test coverage detected