Skip to content

Commit ed4badf

Browse files
ferdymercurypcanal
andcommitted
[nfc] consistent renaming of all buffersize variables (#19610)
--------- Co-authored-by: Philippe Canal <[email protected]>
1 parent ecf7287 commit ed4badf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+156
-156
lines changed

core/base/inc/TBuffer.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ class TBuffer : public TObject {
6464
void operator=(const TBuffer &) = delete;
6565

6666
Int_t Read(const char *name) override { return TObject::Read(name); }
67-
Int_t Write(const char *name, Int_t opt, Int_t bufs) override
68-
{ return TObject::Write(name, opt, bufs); }
69-
Int_t Write(const char *name, Int_t opt, Int_t bufs) const override
70-
{ return TObject::Write(name, opt, bufs); }
67+
Int_t Write(const char *name, Int_t opt, Int_t bufsize) override
68+
{ return TObject::Write(name, opt, bufsize); }
69+
Int_t Write(const char *name, Int_t opt, Int_t bufsize) const override
70+
{ return TObject::Write(name, opt, bufsize); }
7171

7272
public:
7373
enum EMode { kRead = 0, kWrite = 1 };
@@ -78,16 +78,16 @@ class TBuffer : public TObject {
7878
enum { kInitialSize = 1024, kMinimalSize = 128 };
7979

8080
TBuffer(EMode mode);
81-
TBuffer(EMode mode, Int_t bufsiz);
82-
TBuffer(EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr);
81+
TBuffer(EMode mode, Int_t bufsize);
82+
TBuffer(EMode mode, Int_t bufsize, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr);
8383
virtual ~TBuffer();
8484

8585
Int_t GetBufferVersion() const { return fVersion; }
8686
Bool_t IsReading() const { return (fMode & kWrite) == 0; }
8787
Bool_t IsWriting() const { return (fMode & kWrite) != 0; }
8888
void SetReadMode();
8989
void SetWriteMode();
90-
void SetBuffer(void *buf, UInt_t bufsiz = 0, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr);
90+
void SetBuffer(void *buf, UInt_t bufsize = 0, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr);
9191
ReAllocCharFun_t GetReAllocFunc() const;
9292
void SetReAllocFunc(ReAllocCharFun_t reallocfunc = nullptr);
9393
void SetBufferOffset(Int_t offset = 0) { fBufCur = fBuffer+offset; }

core/base/src/TBuffer.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ TBuffer::TBuffer(EMode mode)
7070
/// Create an I/O buffer object. Mode should be either TBuffer::kRead or
7171
/// TBuffer::kWrite.
7272

73-
TBuffer::TBuffer(EMode mode, Int_t bufsiz)
73+
TBuffer::TBuffer(EMode mode, Int_t bufsize)
7474
{
75-
if (bufsiz < 0)
76-
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz, kMaxBufferSize);
77-
if (bufsiz < kMinimalSize) bufsiz = kMinimalSize;
78-
fBufSize = bufsiz;
75+
if (bufsize < 0)
76+
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize);
77+
if (bufsize < kMinimalSize) bufsize = kMinimalSize;
78+
fBufSize = bufsize;
7979
fMode = mode;
8080
fVersion = 0;
8181
fParent = nullptr;
@@ -101,11 +101,11 @@ TBuffer::TBuffer(EMode mode, Int_t bufsiz)
101101
/// is provided, a Fatal error will be issued if the Buffer attempts to
102102
/// expand.
103103

104-
TBuffer::TBuffer(EMode mode, Int_t bufsiz, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc)
104+
TBuffer::TBuffer(EMode mode, Int_t bufsize, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc)
105105
{
106-
if (bufsiz < 0)
107-
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz, kMaxBufferSize);
108-
fBufSize = bufsiz;
106+
if (bufsize < 0)
107+
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize);
108+
fBufSize = bufsize;
109109
fMode = mode;
110110
fVersion = 0;
111111
fParent = nullptr;
@@ -283,7 +283,7 @@ ReAllocCharFun_t TBuffer::GetReAllocFunc() const
283283
/// Set which memory reallocation method to use. If reallocafunc is null,
284284
/// reset it to the default value (TStorage::ReAlloc)
285285

286-
void TBuffer::SetReAllocFunc(ReAllocCharFun_t reallocfunc )
286+
void TBuffer::SetReAllocFunc(ReAllocCharFun_t reallocfunc)
287287
{
288288
if (reallocfunc) {
289289
fReAllocFunc = reallocfunc;

core/cont/src/TCollection.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,17 +676,17 @@ void TCollection::Streamer(TBuffer &b)
676676
/// objects using a single key specify a name and set option to
677677
/// TObject::kSingleKey (i.e. 1).
678678

679-
Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const
679+
Int_t TCollection::Write(const char *name, Int_t option, Int_t bufsize) const
680680
{
681681
if ((option & kSingleKey)) {
682-
return TObject::Write(name, option, bsize);
682+
return TObject::Write(name, option, bufsize);
683683
} else {
684684
option &= ~kSingleKey;
685685
Int_t nbytes = 0;
686686
TIter next(this);
687687
TObject *obj;
688688
while ((obj = next())) {
689-
nbytes += obj->Write(name, option, bsize);
689+
nbytes += obj->Write(name, option, bufsize);
690690
}
691691
return nbytes;
692692
}
@@ -700,9 +700,9 @@ Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const
700700
/// objects using a single key specify a name and set option to
701701
/// TObject::kSingleKey (i.e. 1).
702702

703-
Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize)
703+
Int_t TCollection::Write(const char *name, Int_t option, Int_t bufsize)
704704
{
705-
return ((const TCollection*)this)->Write(name,option,bsize);
705+
return ((const TCollection*)this)->Write(name,option,bufsize);
706706
}
707707

708708
////////////////////////////////////////////////////////////////////////////////

core/cont/src/TMap.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,20 +402,20 @@ void TMap::Streamer(TBuffer &b)
402402
/// objects using a single key specify a name and set option to
403403
/// TObject::kSingleKey (i.e. 1).
404404

405-
Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const
405+
Int_t TMap::Write(const char *name, Int_t option, Int_t bufsize) const
406406
{
407407
if ((option & kSingleKey)) {
408-
return TObject::Write(name, option, bsize);
408+
return TObject::Write(name, option, bufsize);
409409
} else {
410410
option &= ~kSingleKey;
411411
Int_t nbytes = 0;
412412
TIter next(fTable);
413413
TPair *a;
414414
while ((a = (TPair*) next())) {
415415
if (a->Key())
416-
nbytes += a->Key()->Write(name, option, bsize);
416+
nbytes += a->Key()->Write(name, option, bufsize);
417417
if (a->Value())
418-
nbytes += a->Value()->Write(name, option, bsize);
418+
nbytes += a->Value()->Write(name, option, bufsize);
419419
}
420420
return nbytes;
421421
}
@@ -429,9 +429,9 @@ Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const
429429
/// objects using a single key specify a name and set option to
430430
/// TObject::kSingleKey (i.e. 1).
431431

432-
Int_t TMap::Write(const char *name, Int_t option, Int_t bsize)
432+
Int_t TMap::Write(const char *name, Int_t option, Int_t bufsize)
433433
{
434-
return ((const TMap*)this)->Write(name,option,bsize);
434+
return ((const TMap*)this)->Write(name,option,bufsize);
435435
}
436436

437437
/** \class TPair

graf3d/g3d/inc/TXTRU.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TXTRU : public TShape {
8787
private:
8888
void DumpPoints(int npoints, float *pointbuff) const;
8989
void DumpSegments(int nsegments, int *segbuff) const;
90-
void DumpPolygons(int npolygons, int *polybuff, int buffsize) const;
90+
void DumpPolygons(int npolygons, int *polybuff, int bufsize) const;
9191

9292
ClassDefOverride(TXTRU,1) //TXTRU shape
9393
};

graf3d/g3d/src/TXTRU.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ void TXTRU::DumpSegments(int nsegments, int *segbuff) const
709709
////////////////////////////////////////////////////////////////////////////////
710710
/// Dump the derived polygon info for visual inspection
711711

712-
void TXTRU::DumpPolygons(int npolygons, int *polybuff, int buffsize) const
712+
void TXTRU::DumpPolygons(int npolygons, int *polybuff, int bufsize) const
713713
{
714714
std::cout << "TXTRU::DumpPolygons - " << npolygons << " polygons" << std::endl;
715715
int ioff = 0;
@@ -729,7 +729,7 @@ void TXTRU::DumpPolygons(int npolygons, int *polybuff, int buffsize) const
729729
}
730730
std::cout << polybuff[ioff++] << ")" << std::endl;
731731
}
732-
std::cout << " buffer size " << buffsize << " last used " << --ioff << std::endl;
732+
std::cout << " buffer size " << bufsize << " last used " << --ioff << std::endl;
733733
}
734734

735735
////////////////////////////////////////////////////////////////////////////////

graf3d/gl/src/TGLOutput.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ Bool_t TGLOutput::CapturePostscript(TGLViewer & viewer, EFormat format, const ch
104104
assert(kFALSE);
105105
return kFALSE;
106106
}
107-
Int_t buffsize = 0, state = GL2PS_OVERFLOW;
107+
Int_t bufsize = 0, state = GL2PS_OVERFLOW;
108108
viewer.DoDraw();
109109
viewer.fIsPrinting = kTRUE;
110110
while (state == GL2PS_OVERFLOW) {
111-
buffsize += 1024*1024;
111+
bufsize += 1024*1024;
112112
gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr,
113113
gl2psFormat, gl2psSort, GL2PS_USE_CURRENT_VIEWPORT
114114
| GL2PS_SILENT | GL2PS_BEST_ROOT | GL2PS_OCCLUSION_CULL | 0,
115115
GL_RGBA, 0, nullptr,0, 0, 0,
116-
buffsize, output, nullptr);
116+
bufsize, output, nullptr);
117117
viewer.DoDraw();
118118
state = gl2psEndPage();
119119
std::cout << ".";
@@ -210,17 +210,17 @@ void TGLOutput::Capture(TGLViewer & viewer)
210210

211211
Int_t gl2psFormat = GL2PS_EPS;
212212
Int_t gl2psSort = GL2PS_BSP_SORT;
213-
Int_t buffsize = 0, state = GL2PS_OVERFLOW;
213+
Int_t bufsize = 0, state = GL2PS_OVERFLOW;
214214
viewer.DoDraw();
215215
viewer.fIsPrinting = kTRUE;
216216

217217
while (state == GL2PS_OVERFLOW) {
218-
buffsize += 1024*1024;
218+
bufsize += 1024*1024;
219219
gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr,
220220
gl2psFormat, gl2psSort, GL2PS_USE_CURRENT_VIEWPORT
221221
| GL2PS_SILENT | GL2PS_BEST_ROOT | GL2PS_OCCLUSION_CULL | 0,
222222
GL_RGBA, 0, nullptr,0, 0, 0,
223-
buffsize, output, nullptr);
223+
bufsize, output, nullptr);
224224
viewer.DoDraw();
225225
state = gl2psEndPage();
226226
std::cout << ".";

graf3d/gl/src/TGLPlotPainter.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void TGLPlotPainter::PrintPlot()const
243243

244244
Int_t gl2psFormat = GL2PS_EPS;
245245
Int_t gl2psSort = GL2PS_BSP_SORT;
246-
Int_t buffsize = 0;
246+
Int_t bufsize = 0;
247247
Int_t state = GL2PS_OVERFLOW;
248248
GLint gl2psoption = GL2PS_USE_CURRENT_VIEWPORT |
249249
GL2PS_SILENT |
@@ -252,11 +252,11 @@ void TGLPlotPainter::PrintPlot()const
252252
0;
253253

254254
while (state == GL2PS_OVERFLOW) {
255-
buffsize += 1024*1024;
255+
bufsize += 1024*1024;
256256
gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr,
257257
gl2psFormat, gl2psSort, gl2psoption,
258258
GL_RGBA, 0, nullptr,0, 0, 0,
259-
buffsize, output, nullptr);
259+
bufsize, output, nullptr);
260260
DrawPlot();
261261
state = gl2psEndPage();
262262
}

hist/hist/inc/TH1.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,13 @@ class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
626626
const Double_t *zBins);
627627
virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
628628
virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt = type; }
629-
virtual void SetBuffer(Int_t buffersize, Option_t *option="");
629+
virtual void SetBuffer(Int_t bufsize, Option_t *option="");
630630
virtual UInt_t SetCanExtend(UInt_t extendBitMask);
631631
virtual void SetContent(const Double_t *content);
632632
virtual void SetContour(Int_t nlevels, const Double_t *levels = nullptr);
633633
virtual void SetContourLevel(Int_t level, Double_t value);
634634
virtual void SetColors(Color_t linecolor = -1, Color_t markercolor = -1, Color_t fillcolor = -1);
635-
static void SetDefaultBufferSize(Int_t buffersize=1000);
635+
static void SetDefaultBufferSize(Int_t bufsize=1000);
636636
static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
637637
virtual void SetDirectory(TDirectory *dir);
638638
virtual void SetEntries(Double_t n) { fEntries = n; }

hist/hist/inc/TProfile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class TProfile : public TH1D {
131131
void SetBins(Int_t nbins, Double_t xmin, Double_t xmax) override;
132132
void SetBins(Int_t nx, const Double_t *xbins) override;
133133
void SetBinsLength(Int_t n=-1) override;
134-
void SetBuffer(Int_t buffersize, Option_t *option="") override;
134+
void SetBuffer(Int_t bufsize, Option_t *option="") override;
135135
virtual void SetErrorOption(Option_t *option=""); // *MENU*
136136
void Sumw2(Bool_t flag = kTRUE) override;
137137

0 commit comments

Comments
 (0)