| 164 | } |
| 165 | |
| 166 | void ULuaFunction::SuspendOverrides(UClass* Class) |
| 167 | { |
| 168 | UClass* OrphanedClass; |
| 169 | if (const auto Exists = SuspendedOverrides.Find(Class)) |
| 170 | { |
| 171 | OrphanedClass = *Exists; |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | OrphanedClass = MakeOrphanedClass(Class); |
| 176 | SuspendedOverrides.Add(Class, OrphanedClass); |
| 177 | } |
| 178 | |
| 179 | auto Current = &Class->Children; |
| 180 | while (*Current) |
| 181 | { |
| 182 | auto LuaFunction = Cast<ULuaFunction>(*Current); |
| 183 | if (!LuaFunction) |
| 184 | { |
| 185 | Current = &(*Current)->Next; |
| 186 | continue; |
| 187 | } |
| 188 | |
| 189 | *Current = LuaFunction->Next; |
| 190 | const auto Overridden = LuaFunction->GetOverridden(); |
| 191 | if (!Overridden || Overridden->GetOuter() != Class) |
| 192 | continue; |
| 193 | |
| 194 | LuaFunction->Rename(nullptr, OrphanedClass, RenameFlags); |
| 195 | Overridden->Rename(*Overridden->GetName().LeftChop(OverriddenSuffix.Length()), nullptr, RenameFlags); |
| 196 | |
| 197 | const auto OrphanedNext = OrphanedClass->Children; |
| 198 | OrphanedClass->Children = LuaFunction; |
| 199 | LuaFunction->Next = OrphanedNext; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | void ULuaFunction::ResumeOverrides(UClass* Class) |
| 204 | { |
nothing calls this directly
no test coverage detected