Skip to content

Commit

Permalink
Use nameof instead of hardcoded name for TargetID
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael P. Starkweather committed Jan 13, 2019
1 parent 6801047 commit 6922d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ModTek/AdvancedJSONMerger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public static class AdvancedJSONMerger
public static string GetTargetID(string modEntryPath)
{
var merge = ModTek.ParseGameJSONFile(modEntryPath);
return merge["TargetID"].ToString();
return merge[nameof(MergeFile.TargetID)].ToString();
}

public static bool IsAdvancedJSONMerge(JObject merge)
{
return merge["TargetID"] != null;
return merge[nameof(MergeFile.TargetID)] != null;
}

public static void ProcessInstructionsJObject(JObject target, JObject merge)
Expand Down

0 comments on commit 6922d20

Please sign in to comment.