mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-04 10:51:39 -04:00
slightly optimized 'TruncSpace' helper function .
This commit is contained in:
parent
82bc843940
commit
e64655d878
1 changed files with 3 additions and 2 deletions
|
@ -508,8 +508,9 @@ void TruncSpace(CString& str)
|
|||
{
|
||||
str.TrimLeft();
|
||||
str.TrimRight();
|
||||
if (str.Find(" ") >= 0) {
|
||||
str.Delete(str.Find(" "), str.GetLength() - str.Find(" "));
|
||||
auto const spacePos = str.Find(" ");
|
||||
if (spacePos >= 0) {
|
||||
str.Delete(spacePos, str.GetLength() - spacePos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue