Skip to content

Commit 0da587f

Browse files
committed
set modified to a bool instead of an int
- make HideRepairMissingScripts() a static function
1 parent 67a7447 commit 0da587f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public override void OnInspectorGUI() {
214214
}
215215
}
216216

217-
private bool HideRepairMissingScripts(){
217+
private static bool HideRepairMissingScripts(){
218218
var docPath = Application.dataPath + "/FbxExporters/FBX_Exporter_User_Guide_v1.1.0b1.pdf";
219219
return File.Exists(docPath)? false : true;
220220
}

Assets/FbxExporters/Editor/FbxExporterRepairMissingScripts.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static bool ReplaceGUIDInTextAssets ()
6565
private static bool ReplaceGUIDInFile (string path)
6666
{
6767
// try to read file, assume it's a text file for now
68-
int modified = 0;
68+
bool modified = false;
6969

7070
try {
7171
var sr = new StreamReader (path);
@@ -90,8 +90,8 @@ private static bool ReplaceGUIDInFile (string path)
9090
var line = sr.ReadLine ();
9191

9292
if (line.Contains (ForumPackageSearchID)) {
93-
modified++;
9493
line = line.Replace (ForumPackageSearchID, CurrentPackageSearchID);
94+
modified |= true;
9595
}
9696

9797
sw.WriteLine (line);
@@ -100,7 +100,7 @@ private static bool ReplaceGUIDInFile (string path)
100100
sr.Close ();
101101
sw.Close ();
102102

103-
if (modified > 0) {
103+
if (modified) {
104104
File.Delete (path);
105105
File.Move (path + ".remap", path);
106106
return true;

0 commit comments

Comments
 (0)