| 2145 | } |
| 2146 | |
| 2147 | void EnumDef::SortByValue() { |
| 2148 | auto &v = vals.vec; |
| 2149 | if (IsUInt64()) |
| 2150 | std::sort(v.begin(), v.end(), [](const EnumVal *e1, const EnumVal *e2) { |
| 2151 | return e1->GetAsUInt64() < e2->GetAsUInt64(); |
| 2152 | }); |
| 2153 | else |
| 2154 | std::sort(v.begin(), v.end(), [](const EnumVal *e1, const EnumVal *e2) { |
| 2155 | return e1->GetAsInt64() < e2->GetAsInt64(); |
| 2156 | }); |
| 2157 | } |
| 2158 | |
| 2159 | void EnumDef::RemoveDuplicates() { |
| 2160 | // This method depends form SymbolTable implementation! |
no test coverage detected