Skip to content

Commit 5a6ecd6

Browse files
committed
made ColEntry immutable
1 parent 5f0d5d9 commit 5a6ecd6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/extendable.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ SparseArrays.nnz(E::ExtendableSparseMatrix)=(nnz(E.cscmatrix)+nnz(E.extmatrix))
107107

108108
# Struct holding pair of value and row
109109
# number, for sorting
110-
mutable struct ColEntry{Tv,Ti<:Integer}
110+
struct ColEntry{Tv,Ti<:Integer}
111111
i::Ti
112112
v::Tv
113113
end
@@ -158,8 +158,7 @@ function _splice(E::SparseMatrixExtension{Tv,Ti},S::SparseMatrixCSC{Tv,Ti}) wher
158158
while k>0
159159
if E.rowval[k]>0
160160
lxcol+=1
161-
col[lxcol].i=E.rowval[k]
162-
col[lxcol].v=E.nzval[k]
161+
col[lxcol]=ColEntry(E.rowval[k],E.nzval[k])
163162
end
164163
k=E.colptr[k]
165164
end

0 commit comments

Comments
 (0)