Domande taggate «xcode11.4»


3
Avvertenza: l'inizializzazione di 'UnsafeBufferPointer <T>' genera un puntatore buffer pendente
Dopo l'aggiornamento a Swift 5.2 / Xcode 11.4 viene visualizzato un avviso al seguente codice: extension Data { init&lt;T&gt;(from value: T) { var value = value let pointer = UnsafeBufferPointer(start: &amp;value, count: 1) self.init(buffer: pointer) } func to&lt;T&gt;(type: T.Type) -&gt; T { return self.withUnsafeBytes { $0.load(as: T.self) } } } …
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.