Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ internal static class PrimitiveColumnContainerHelpers
internal static DataFrameBuffer<T> GetOrCreateMutable<T>(this IList<ReadOnlyDataFrameBuffer<T>> bufferList, int index)
where T : unmanaged
{
ReadOnlyDataFrameBuffer<T> sourceBuffer = bufferList[index];
DataFrameBuffer<T> mutableBuffer = sourceBuffer as DataFrameBuffer<T>;
var sourceBuffer = bufferList[index];

if (mutableBuffer == null)
if (sourceBuffer is not DataFrameBuffer<T> mutableBuffer)
{
mutableBuffer = DataFrameBuffer<T>.GetMutableBuffer(sourceBuffer);
bufferList[index] = mutableBuffer;
}


return mutableBuffer;
}
}
Expand Down
Loading