Skip to content

Commit 0b1bd2e

Browse files
Remove non-ideal safety checks
1 parent c66bf06 commit 0b1bd2e

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/main/java/ch/njol/skript/variables/HintManager.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ public void exitScope() {
117117
* (i.e. the scope pushed by the most recent {@link #enterScope()} call).
118118
*/
119119
public void clearScope(int level) {
120-
if (areHintsUnavailable()) {
121-
return;
122-
}
123-
typeHints.get(Math.min(level, typeHints.size() - 1)).clear();
120+
typeHints.get(level).clear();
124121
}
125122

126123
/**
@@ -133,13 +130,6 @@ public void clearScope(int level) {
133130
* @param to The scope to copy hints to.
134131
*/
135132
public void mergeScope(int from, int to) {
136-
if (areHintsUnavailable()) {
137-
return;
138-
}
139-
int max = typeHints.size() - 1;
140-
to = Math.min(to, max);
141-
from = Math.min(from, max);
142-
143133
var fromMap = typeHints.get(from);
144134
var toMap = typeHints.get(to);
145135

0 commit comments

Comments
 (0)