mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 13:52:01 +00:00
Adds min and max, comments, and all of swift's keywords + fix docs (#5737)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
f2a1272303
commit
c580fa284c
@@ -77,11 +77,8 @@ public final class FlatBufferBuilder {
|
||||
public func clearOffsets() {
|
||||
_vtable = []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Create Tables
|
||||
|
||||
extension FlatBufferBuilder {
|
||||
|
||||
// MARK: - Create Tables
|
||||
|
||||
/// Checks if the required fields were serialized into the buffer
|
||||
/// - Parameters:
|
||||
@@ -476,11 +473,16 @@ extension FlatBufferBuilder {
|
||||
_bb.push(value: element, len: MemoryLayout<T>.size)
|
||||
return _bb.size
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
/// Used to debug the buffer and the implementation
|
||||
public func debug(str: String = "normal memory: ") {
|
||||
_bb.debugMemory(str: str)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
extension FlatBufferBuilder: CustomDebugStringConvertible {
|
||||
|
||||
public var debugDescription: String {
|
||||
"""
|
||||
buffer debug:
|
||||
\(_bb)
|
||||
builder debug:
|
||||
{ finished: \(finished), serializeDefaults: \(serializeDefaults), isNested: \(isNested) }
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user