Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/IntVector.java @ 573:e49f9d9513fa
Partial blame when start/end revisions are in the middle of a single filename history
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Fri, 12 Apr 2013 19:50:21 +0200 |
| parents | d3c71498919c |
| children | 88afffd39899 |
comparison
equal
deleted
inserted
replaced
| 572:becd2a1310a2 | 573:e49f9d9513fa |
|---|---|
| 82 | 82 |
| 83 public void clear() { | 83 public void clear() { |
| 84 count = 0; | 84 count = 0; |
| 85 } | 85 } |
| 86 | 86 |
| 87 public void trimTo(int newSize) { | |
| 88 if (newSize < 0 || newSize > count) { | |
| 89 throw new IllegalArgumentException(String.format("Can't trim vector of size %d to %d", count, newSize)); | |
| 90 } | |
| 91 count = newSize; | |
| 92 } | |
| 93 | |
| 87 public void trimToSize() { | 94 public void trimToSize() { |
| 88 data = toArray(true); | 95 data = toArray(true); |
| 89 } | 96 } |
| 90 | 97 |
| 91 | 98 |
