Skip to content

Commit

Permalink
avoid unnecessary call to location_flagged
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 24, 2021
1 parent 3df81b2 commit 9dfb3bb
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -645,6 +645,9 @@ public static boolean runFlaggedCheck(ScriptPath path, String switchName, Abstra
}

public boolean runLocationFlaggedCheck(ScriptPath path, String switchName, Location location) {
if (!path.switches.containsKey(switchName)) { // NOTE: opti to avoid 'getFlagTracker' call, also prevents pre-1.16 borks
return true;
}
return runFlaggedCheck(path, switchName, location == null ? null : new LocationTag(location).getFlagTracker());
}

Expand Down

0 comments on commit 9dfb3bb

Please sign in to comment.