Skip to content

Commit 30adeb2

Browse files
author
AJubrey
committed
[ADDED] function summary
[CHANGED] variable declarations to be more streamlined for scoreA and scoreB
1 parent 89ebd10 commit 30adeb2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,17 +447,18 @@ private int ChoosePreferredDCCApp(int optionA, int optionB)
447447
return -1;
448448
}
449449

450-
int scoreA = -1;
451-
int scoreB = -1;
450+
int scoreA = s_PreferenceList.FindIndex(app => RemoveSpacesAndNumbers(app).Equals(RemoveSpacesAndNumbers(appA)));
452451

453-
scoreA = s_PreferenceList.FindIndex(app => RemoveSpacesAndNumbers(app).Equals(RemoveSpacesAndNumbers(appA)));
454-
455-
scoreB = s_PreferenceList.FindIndex(app => RemoveSpacesAndNumbers(app).Equals(RemoveSpacesAndNumbers(appB)));
452+
int scoreB = s_PreferenceList.FindIndex(app => RemoveSpacesAndNumbers(app).Equals(RemoveSpacesAndNumbers(appB)));
456453

457454
return scoreA < scoreB ? optionA : optionB;
458455
}
459456

460-
public string RemoveSpacesAndNumbers(string s)
457+
/// <summary>
458+
/// Takes a given string and removes any spaces or numbers from it
459+
/// </summary>
460+
/// <param name="s"></param>
461+
public static string RemoveSpacesAndNumbers(string s)
461462
{
462463
return System.Text.RegularExpressions.Regex.Replace(s, @"[\s^0-9]", "");
463464
}

0 commit comments

Comments
 (0)