MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / checkRanges

Method checkRanges

src/main/java/net/optifine/render/VboRegion.java:155–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 }
154
155 private void checkRanges()
156 {
157 int i = 0;
158 int j = 0;
159
160 for (VboRange vborange = (VboRange)this.rangeList.getFirst().getItem(); vborange != null; vborange = vborange.getNext())
161 {
162 ++i;
163 j += vborange.getSize();
164
165 if (vborange.getPosition() < 0 || vborange.getSize() <= 0 || vborange.getPositionNext() > this.positionTop)
166 {
167 throw new RuntimeException("Invalid range: " + vborange);
168 }
169
170 VboRange vborange1 = vborange.getPrev();
171
172 if (vborange1 != null && vborange.getPosition() < vborange1.getPositionNext())
173 {
174 throw new RuntimeException("Invalid range: " + vborange);
175 }
176
177 VboRange vborange2 = vborange.getNext();
178
179 if (vborange2 != null && vborange.getPositionNext() > vborange2.getPosition())
180 {
181 throw new RuntimeException("Invalid range: " + vborange);
182 }
183 }
184
185 if (i != this.rangeList.getSize())
186 {
187 throw new RuntimeException("Invalid count: " + i + " <> " + this.rangeList.getSize());
188 }
189 else if (j != this.sizeUsed)
190 {
191 throw new RuntimeException("Invalid size: " + j + " <> " + this.sizeUsed);
192 }
193 }
194
195 private void checkVboSize(int sizeMin)
196 {

Callers

nothing calls this directly

Calls 7

getNextMethod · 0.95
getSizeMethod · 0.95
getPositionMethod · 0.95
getPositionNextMethod · 0.95
getPrevMethod · 0.95
getItemMethod · 0.45
getFirstMethod · 0.45

Tested by

no test coverage detected