[stdlib] Restore Array value semantics

'nuff said.

Swift SVN r18923
This commit is contained in:
Dave Abrahams
2014-06-16 13:56:15 +00:00
parent acc2c3be40
commit 85533dd7d3
9 changed files with 69 additions and 46 deletions

View File

@@ -123,6 +123,10 @@ struct ContiguousArrayBuffer<T> : ArrayBufferType, LogicValue {
return isUniquelyReferenced() && capacity >= minimumCapacity ? self : nil
}
mutating func isMutableAndUniquelyReferenced() -> Bool {
return isUniquelyReferenced()
}
/// If this buffer is backed by a ContiguousArrayBuffer, return it.
/// Otherwise, return nil. Note: the result's elementStorage may
/// not match ours, if we are a SliceBuffer.