Hello,
This code worked before upgrading to Xcode 11.4.1
///Double Complex vector phase radians
static func phase(Real x:[Double], Imag y:[Double])->[Double] {
guard (x.count == y.count) else {
myLog(toFile: false, toCl:false, message: K.BOMB)
return [0]
}
var real:[Double] = x
var imaginary:[Double] = y
var splitComplex = DSPDoubleSplitComplex(realp: &real, imagp: &imaginary)
var results:[Double] = zeroD(npts:x.count)
vDSP_zvphasD(&splitComplex, 1, &results, t, vDSP_Length(x.count))
return results
}
Now the warning
Inout expression creates a temporary pointer, but argument 'imagp' should be a pointer that outlives the call to 'init(realp:imagp:)'
Inout expression creates a temporary pointer, but argument 'realp' should be a pointer that outlives the call to 'init(realp:imagp:)'
What changed? Is there a quick fix?
Thanks.