Skip to content

Commit

Permalink
Added info to assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaron committed Dec 19, 2023
1 parent ae8fd41 commit 52a40bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ open class PriceSeries(private var capacity: Int) {
* Increase the capacity to the [newCapacity]
*/
fun increaseCapacity(newCapacity: Int) {
require(newCapacity > capacity)
require(newCapacity > capacity) { "new capcity should be larger than old one, new=$newCapacity old=$capacity"}
val oldData = toDoubleArray()
data = DoubleArray(newCapacity)
System.arraycopy(oldData, 0, data, 0, size)
Expand Down

0 comments on commit 52a40bb

Please sign in to comment.