ReadUintSlice reads []uint with optional ref/type info
(refMode RefMode, readType bool)
| 450 | |
| 451 | // ReadUintSlice reads []uint with optional ref/type info |
| 452 | func (c *ReadContext) ReadUintSlice(refMode RefMode, readType bool) []uint { |
| 453 | err := c.Err() |
| 454 | if refMode != RefModeNone { |
| 455 | if c.buffer.ReadInt8(err) == NullFlag { |
| 456 | return nil |
| 457 | } |
| 458 | } |
| 459 | if readType { |
| 460 | actual := TypeId(c.buffer.ReadUint8(err)) |
| 461 | expected := TypeId(UINT64_ARRAY) |
| 462 | if strconv.IntSize == 32 { |
| 463 | expected = UINT32_ARRAY |
| 464 | } |
| 465 | if actual != expected { |
| 466 | c.SetError(TypeMismatchError(actual, expected)) |
| 467 | return nil |
| 468 | } |
| 469 | } |
| 470 | return ReadUintSlice(c.buffer, err) |
| 471 | } |
| 472 | |
| 473 | // ReadFloat32Slice reads []float32 with optional ref/type info |
| 474 | func (c *ReadContext) ReadFloat32Slice(refMode RefMode, readType bool) []float32 { |
no test coverage detected