Skip to content

Commit 41a877a

Browse files
committed
io: Add Set/GetByteCounts to TBufferFile
Note to store and restore the larger than 1GB byte count use: // Copy the content of the const reference. auto bytecounts{b.GetByteCounts()}; ... b.SetByteCounts(std::move(bytecounts));
1 parent 5117a92 commit 41a877a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

io/io/inc/TBufferFile.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ class TBufferFile : public TBufferIO {
117117

118118
TObject *ReadObject(const TClass *cl) override;
119119

120-
ByteCountFinder_t GetByteCounts() const { return fByteCounts; }
120+
const ByteCountFinder_t& GetByteCounts() const { return fByteCounts; }
121+
void SetByteCounts(ByteCountFinder_t &&byteCounts) { fByteCounts = std::move(byteCounts); }
121122

122123
using TBufferIO::CheckObject;
123124

0 commit comments

Comments
 (0)