@@ -309,7 +309,7 @@ function OERecordingMeta(settings::OESettings{S, T}, rec_e::LightXML.XMLElement)
309
309
throw (CorruptedException (" Could not find PROCESSOR elements" ))
310
310
end
311
311
nproc = length (proc_es)
312
- rec_procs = Vector {T} (nproc)
312
+ @compat rec_procs = Vector {T} (undef, nproc)
313
313
314
314
for (i, proc_e) in enumerate (proc_es)
315
315
id = find_matching_proc (settings. recording_chain, proc_e)
@@ -367,7 +367,7 @@ function OEExperMeta(settings::OESettings{S, T}, exper_e::LightXML.XMLElement) w
367
367
throw (CorruptedException (" Could not find RECORDING elements" ))
368
368
end
369
369
nrec = length (rec_es)
370
- recordings = Vector {OERecordingMeta{T}} (nrec)
370
+ @compat recordings = Vector {OERecordingMeta{T}} (undef, nrec)
371
371
for (i, rec_e) in enumerate (rec_es)
372
372
recordings[i] = OERecordingMeta (settings, rec_e)
373
373
end
@@ -424,7 +424,7 @@ function channel_arr(proc_e::LightXML.XMLElement, ::Type{T} = String) where {T<:
424
424
end
425
425
nchan = length (channel_vec)
426
426
chan_rec = fill (false , nchan)
427
- chnos = Array {Int} (nchan)
427
+ @compat chnos = Array {Int} (undef, nchan)
428
428
for (i, chan_e) in enumerate (channel_vec)
429
429
sel_e = required_find_element (chan_e, " SELECTIONSTATE" )
430
430
record_attr = attribute (sel_e, " record" , required= true )
@@ -441,7 +441,7 @@ function channel_arr(proc_e::LightXML.XMLElement, ::Type{T} = String) where {T<:
441
441
# Channel info
442
442
ch_info_e = required_find_element (proc_e, " CHANNEL_INFO" )
443
443
chinfo_children = collect (child_elements (ch_info_e))
444
- channels = Array {OEChannel{T}} (nrec)
444
+ @compat channels = Array {OEChannel{T}} (undef, nrec)
445
445
recno = 1
446
446
for (i, chan_e) in enumerate (chinfo_children)
447
447
if chan_rec[i]
@@ -451,7 +451,7 @@ function channel_arr(proc_e::LightXML.XMLElement, ::Type{T} = String) where {T<:
451
451
chname = attribute (chan_e, " name" , required = true )
452
452
bitvolt_attr = attribute (chan_e, " gain" , required = true )
453
453
bitvolts = parse (Float64, bitvolt_attr)
454
- channels[recno] = OEChannel {String} (chname,
454
+ @compat channels[recno] = OEChannel {String} (chname,
455
455
info_chno,
456
456
bitvolts,
457
457
Vector {Int} (),
@@ -517,7 +517,7 @@ function recordings_are_consistent(rec_es::Vector{LightXML.XMLElement})
517
517
chan_xml = XmlNode (" CHANNEL" , XmlNode[], [" name" , " filename" ])
518
518
proc_xml = XmlNode (" PROCESSOR" , [chan_xml], [" id" ])
519
519
nrec = length (rec_es)
520
- attr_sets = Vector {Set{String}} (nrec)
520
+ @compat attr_sets = Vector {Set{String}} (undef, nrec)
521
521
for (i, rec_e) in enumerate (rec_es)
522
522
attr_sets[i] = Set (recurse_xml_attr (rec_e, proc_xml))
523
523
end
585
585
# ## Helper Functions ###
586
586
function required_find_element (e:: LightXML.XMLElement , name:: AbstractString )
587
587
maybe_e = find_element (e, name)
588
- isa (maybe_e, Void ) && throw (CorruptedException (" Could not find $name element" ))
588
+ @compat isa (maybe_e, Nothing ) && throw (CorruptedException (" Could not find $name element" ))
589
589
return maybe_e
590
590
end
591
591
@@ -614,10 +614,10 @@ end
614
614
show (io:: IO , a:: SignalNode ) = show (io, a. content)
615
615
616
616
showfields (io:: IO , a:: Any ) = showfields (IOContext (io, :depth => 0 ), a)
617
- function showfields (io:: IOContext , a:: Any )
617
+ function showfields (io:: IOContext , a:: T ) where T
618
618
depth = get (io, :depth , 0 )
619
619
pad = " " ^ depth
620
- fields = fieldnames (a )
620
+ fields = fieldnames (T )
621
621
depth > 0 && print (io, ' \n ' )
622
622
next_io = IOContext (IOContext (io, :typeinfo => Any), :depth => depth + 1 )
623
623
for field in fields
0 commit comments