Skip to content

Commit

Permalink
root/rbytes: add WriteStdVectorF64
Browse files Browse the repository at this point in the history
  • Loading branch information
sbinet committed Feb 1, 2022
1 parent e488e92 commit ffc817e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions groot/rbytes/wbuffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,22 @@ func (w *WBuffer) WriteFastArrayString(v []string) {
}
}

func (w *WBuffer) WriteStdVectorF64(v []float64) {
const typename = "vector<double>"
if w.err != nil {
return
}
var (
pos = w.WriteVersion(rvers.StreamerInfo)
)
w.WriteI32(int32(len(v)))
w.w.grow(len(v) * 8)
for _, v := range v {
w.writeF64(v)
}
_, _ = w.SetByteCount(pos, typename)
}

func (w *WBuffer) WriteStdVectorStrs(v []string) {
const typename = "vector<string>"
if w.err != nil {
Expand Down

0 comments on commit ffc817e

Please sign in to comment.