Use Truncate to chop off extension in LumpNameSetup.

- Left() always creates a new string. Truncate() can reuse the old one if
  it only has one reference.
This commit is contained in:
Randy Heit 2015-04-04 17:47:36 -05:00
parent 4315423200
commit 6da887c34f

View file

@ -94,7 +94,7 @@ void FResourceLump::LumpNameSetup(FString iname)
{
long slash = iname.LastIndexOf('/');
FString base = (slash >= 0) ? iname.Mid(slash + 1) : iname;
base = base.Left(base.LastIndexOf('.'));
base.Truncate(base.LastIndexOf('.'));
uppercopy(Name, base);
Name[8] = 0;
FullName = iname;