CircularBuffer.Index: remove bogus assert (#978)

Motivation:

CircularBuffer.Index was asserting that its size is the same as a word.
Whilst that's true on 64-bit architectures, the assert itself is bogus
and a left-over from development.

Modifications:

Remove bogus assert.

Result:

Better 32-bit support.
This commit is contained in:
Johannes Weiss 2019-04-23 18:41:49 +01:00 committed by GitHub
parent f6692f5c37
commit 2cfa777013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -80,9 +80,8 @@ public struct CircularBuffer<Element>: CustomStringConvertible {
// if we can, we store the check for the backing here
self._backingCheck = backingCount < Int(_UInt24.max) ? _UInt24(UInt32(backingCount)) : .max
}
assert(MemoryLayout.size(ofValue: self) == MemoryLayout<Int>.size)
}
@inlinable
public static func < (lhs: Index, rhs: Index) -> Bool {
if lhs.isIndexGEQHeadIndex && rhs.isIndexGEQHeadIndex {