Skip to content

Commit fa4d874

Browse files
andreasnoacktkelman
authored andcommitted
Update to new Array syntax (#98)
1 parent 0d24ad6 commit fa4d874

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/query.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ unknown(::Type{format"UNKNOWN"}) = true
5252
unknown{sym}(::Type{DataFormat{sym}}) = false
5353

5454
const ext2sym = Dict{String, @compat(Union{Symbol,Vector{Symbol}})}()
55-
const magic_list = Array(Pair, 0) # sorted, see magic_cmp below
55+
const magic_list = Vector{Pair}(0) # sorted, see magic_cmp below
5656
const sym2info = Dict{Symbol,Any}() # Symbol=>(magic, extension)
57-
const magic_func = Array(Pair, 0) # for formats with complex magic #s
57+
const magic_func = Vector{Pair}(0) # for formats with complex magic #s
5858

5959

6060
function add_format(fmt, magic, extension, load_save_libraries...)
@@ -400,7 +400,7 @@ format inferred from the magic bytes."""
400400
query(io::IO, filename) = query(io, Nullable(Compat.UTF8String(filename)))
401401

402402
function query(io::IO, filename::Nullable{Compat.UTF8String}=Nullable{Compat.UTF8String}())
403-
magic = Array(UInt8, 0)
403+
magic = Vector{UInt8}(0)
404404
pos = position(io)
405405
for p in magic_list
406406
m = first(p)

src/registry.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function detecthdf5(io)
148148
seekend(io)
149149
len = position(io)
150150
seekstart(io)
151-
magic = Array(UInt8, length(h5magic))
151+
magic = Vector{UInt8}(length(h5magic))
152152
pos = position(io)
153153
while pos+length(h5magic) <= len
154154
read!(io, magic)

test/loadsave.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ end
7272
function FileIO.load(s::Stream{format"DUMMY"})
7373
# We're already past the magic bytes
7474
n = read(s, Int64)
75-
out = Array(UInt8, n)
75+
out = Vector{UInt8}(n)
7676
read!(s, out)
7777
close(s)
7878
out

0 commit comments

Comments
 (0)