mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
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:
parent
4315423200
commit
6da887c34f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue