Skip to content

Commit

Permalink
bang: consistently use ! for mutating functions [#907].
Browse files Browse the repository at this point in the history
This deprecates the non-! versions and prints a warning when they
are used. It doesn't quite close out #907 but comes close. There
are still a few lingering mutators like del_each that we may want
to get rid of or rename somehow.
  • Loading branch information
StefanKarpinski authored and ihnorton committed Mar 1, 2013
1 parent 508792c commit 734f762
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extras/dicom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function sequence_item(st, evr, sz)
if isequal(elt.tag, (0xFFFE,0xE00D))
break
end
push(item, elt)
push!(item, elt)
end
return item
end
Expand All @@ -127,7 +127,7 @@ function sequence_parse(st, evr, sz)
if grp != 0xFFFE || elt != 0xE000
error("dicom error: expected item tag in sequence")
end
push(sq, sequence_item(st, evr, itemlen))
push!(sq, sequence_item(st, evr, itemlen))
if itemlen != 0xffffffff
sz -= itemlen
end
Expand Down Expand Up @@ -185,7 +185,7 @@ function pixeldata_parse(st, sz, vr, dcm)
error("dicom error: expected item tag in encapsulated pixel data")
end
if is(dtype,Uint16); xr = div(xr,2); end
push(data, read(st, Array(dtype, xr)))
push!(data, read(st, Array(dtype, xr)))
end
end
return data
Expand Down Expand Up @@ -226,7 +226,7 @@ function string_parse(st, sz, maxlen, spaces)
while position(st) < endpos
c = !first||spaces ? read(st,Char) : skip_spaces(st)
if c == '\\'
push(data, "")
push!(data, "")
first = true
else
data[end] = string(data[end],c) # TODO: inefficient
Expand Down Expand Up @@ -383,7 +383,7 @@ function dcm_parse(st)
if is(fld,false)
return data
else
push(data, fld)
push!(data, fld)
end
# look for transfer syntax UID
if fld.tag == (0x0002,0x0010)
Expand Down

0 comments on commit 734f762

Please sign in to comment.