stdlib: adopt @warn_unused_result

rdar://20957486

Swift SVN r31048
This commit is contained in:
Dmitri Hrybenko
2015-08-06 14:53:18 +00:00
parent 10bdef0936
commit dd3194a18c
74 changed files with 789 additions and 82 deletions

View File

@@ -82,6 +82,7 @@ public struct _StringBuffer {
= ((_storage._capacity() - capacityBump) << 1) + elementShift
}
@warn_unused_result
static func fromCodeUnits<
Encoding : UnicodeCodecType, Input : CollectionType // SequenceType?
where Input.Generator.Element == Encoding.CodeUnit
@@ -169,6 +170,7 @@ public struct _StringBuffer {
// reserveCapacity on String and subsequently use that capacity, in
// two separate phases. Operations with one-phase growth should use
// "grow()," below.
@warn_unused_result
func hasCapacity(
cap: Int, forSubRange r: Range<UnsafePointer<RawByte>>
) -> Bool {