From 9a1f8a22661302e41a47e84dd52f2ea050d7b53c Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 10 Nov 2021 11:51:20 +0300 Subject: [PATCH] remove unnecessary toInt --- .../kotlin/space/kscience/kmath/series/SeriesAlgebra.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/series/SeriesAlgebra.kt b/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/series/SeriesAlgebra.kt index de72c7346..79da3d98d 100644 --- a/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/series/SeriesAlgebra.kt +++ b/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/series/SeriesAlgebra.kt @@ -26,6 +26,7 @@ internal operator fun IntRange.contains(other: IntRange): Boolean = (other.first public interface Series : Buffer { public val origin: Buffer + /** * Absolute position of start of this [Series] in [SeriesAlgebra] */ @@ -114,7 +115,7 @@ public class SeriesAlgebra, out BA : BufferAlgebra, L>( public operator fun Buffer.get(label: L): T? { val index = labels.indexOf(label) if (index == -1) return null - return getAbsolute(index + offset.toInt()) + return getAbsolute(index + offset) } /**