Skip to content

Commit d76e686

Browse files
committed
[nfc] consistent renaming of all buffersize variables
1 parent b6fb6bd commit d76e686

Some content is hidden

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

51 files changed

+1176
-1176
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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ 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;
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) bufsiz = kMinimalSize;
7878
fBufSize = bufsiz;
7979
fMode = mode;
8080
fVersion = 0;
@@ -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
@@ -678,17 +678,17 @@ void TCollection::Streamer(TBuffer &b)
678678
/// objects using a single key specify a name and set option to
679679
/// TObject::kSingleKey (i.e. 1).
680680

681-
Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const
681+
Int_t TCollection::Write(const char *name, Int_t option, Int_t bufsize) const
682682
{
683683
if ((option & kSingleKey)) {
684-
return TObject::Write(name, option, bsize);
684+
return TObject::Write(name, option, bufsize);
685685
} else {
686686
option &= ~kSingleKey;
687687
Int_t nbytes = 0;
688688
TIter next(this);
689689
TObject *obj;
690690
while ((obj = next())) {
691-
nbytes += obj->Write(name, option, bsize);
691+
nbytes += obj->Write(name, option, bufsize);
692692
}
693693
return nbytes;
694694
}
@@ -702,9 +702,9 @@ Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const
702702
/// objects using a single key specify a name and set option to
703703
/// TObject::kSingleKey (i.e. 1).
704704

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

710710
////////////////////////////////////////////////////////////////////////////////

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
@@ -628,13 +628,13 @@ class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
628628
const Double_t *zBins);
629629
virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
630630
virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt = type; }
631-
virtual void SetBuffer(Int_t buffersize, Option_t *option="");
631+
virtual void SetBuffer(Int_t bufsize, Option_t *option="");
632632
virtual UInt_t SetCanExtend(UInt_t extendBitMask);
633633
virtual void SetContent(const Double_t *content);
634634
virtual void SetContour(Int_t nlevels, const Double_t *levels = nullptr);
635635
virtual void SetContourLevel(Int_t level, Double_t value);
636636
virtual void SetColors(Color_t linecolor = -1, Color_t markercolor = -1, Color_t fillcolor = -1);
637-
static void SetDefaultBufferSize(Int_t buffersize=1000);
637+
static void SetDefaultBufferSize(Int_t bufsize=1000);
638638
static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
639639
virtual void SetDirectory(TDirectory *dir);
640640
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)