Skip to content

Commit 53ce599

Browse files
committed
io: Add reset of new bytecount infrastructure
1 parent e94bdea commit 53ce599

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

io/io/inc/TBufferFile.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ class TBufferFile : public TBufferIO {
120120
const ByteCountFinder_t& GetByteCounts() const { return fByteCounts; }
121121
void SetByteCounts(ByteCountFinder_t &&byteCounts) { fByteCounts = std::move(byteCounts); }
122122

123+
void ResetMap() override;
124+
123125
using TBufferIO::CheckObject;
124126

125127
// basic types and arrays of basic types

io/io/src/TBufferFile.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ TBufferFile::~TBufferFile()
114114
{
115115
}
116116

117+
////////////////////////////////////////////////////////////////////////////////
118+
/// Reset buffer maps and clear byte-count tracking structures.
119+
120+
void TBufferFile::ResetMap()
121+
{
122+
TBufferIO::ResetMap();
123+
fByteCountStack.clear();
124+
fByteCounts.clear();
125+
}
126+
117127
////////////////////////////////////////////////////////////////////////////////
118128
/// Increment level.
119129

0 commit comments

Comments
 (0)