From 7264dc2fa20b39e105a5d814a8a7a8f569ed8137 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 24 Nov 2021 00:32:14 -0500 Subject: [PATCH] StRoot/Stv*: replace sys/types.h with stdint.h (#211) --- StRoot/Stv/Factory/FactoryT.h | 20 ++++++++++---------- StRoot/Stv/Factory/StvFactory.h | 6 +++--- StRoot/StvMaker/StvHitLoader.cxx | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/StRoot/Stv/Factory/FactoryT.h b/StRoot/Stv/Factory/FactoryT.h index b3e56ce99ec..94e17e7e5d7 100644 --- a/StRoot/Stv/Factory/FactoryT.h +++ b/StRoot/Stv/Factory/FactoryT.h @@ -37,17 +37,17 @@ class FactoryB : public TNamed static int Alive(void *obj); void setFastDelete() {fFastDel=1;} - void setMaxIncrementCount(uint maxCount) {fMaxCount=maxCount;} - uint getMaxIncrementCount() const {return fMaxCount; } - uint getCurrentSize() const {return fCurCount; } - uint getCurrentCount() const {return fCurCount; } + void setMaxIncrementCount(unsigned int maxCount) {fMaxCount=maxCount;} + unsigned int getMaxIncrementCount() const {return fMaxCount; } + unsigned int getCurrentSize() const {return fCurCount; } + unsigned int getCurrentCount() const {return fCurCount; } protected: - uint fMaxCount; - uint fCurCount; - uint fUseCount; - uint fFastDel; - uint fInstCount; - uint fFreeCount; + unsigned int fMaxCount; + unsigned int fCurCount; + unsigned int fUseCount; + unsigned int fFastDel; + unsigned int fInstCount; + unsigned int fFreeCount; static double fgTotal; }; diff --git a/StRoot/Stv/Factory/StvFactory.h b/StRoot/Stv/Factory/StvFactory.h index 4081672f40f..b8dc71b7679 100644 --- a/StRoot/Stv/Factory/StvFactory.h +++ b/StRoot/Stv/Factory/StvFactory.h @@ -33,7 +33,7 @@ class StvBlock { enum {kSize=100}; StvBlock(StvBlock **bTop,StvHolder **hTop,char *buf); void reset(StvBlock **bTop,StvHolder **hTop); -uint getSize() const {return kSize;} +unsigned int getSize() const {return kSize;} StvBlock *fNext; char *fBuff; @@ -119,7 +119,7 @@ Abstract *StvFactory::getInstance() this->fCurCount < this->fMaxCount); if (this->fFastDel) { - uint nBuf = sizeof(StvBlock) + FENCE; + unsigned int nBuf = sizeof(StvBlock) + FENCE; char *cBuf = new char[nBuf]; cBuf[nBuf-1]=46; new((StvBlock*)cBuf) StvBlock(&fBTop,&fHTop,cBuf); @@ -144,7 +144,7 @@ Abstract *StvFactory::getInstance() template void StvFactory::free(Abstract *obj) { - static const uint shift = (char*)(&(((StvHolder*)1)->fObj))-(char*)1; + static const unsigned int shift = (char*)(&(((StvHolder*)1)->fObj))-(char*)1; obj->unset(); StvHolder* h = (StvHolder*)((char*)obj-shift); assert(h->fFact == this); diff --git a/StRoot/StvMaker/StvHitLoader.cxx b/StRoot/StvMaker/StvHitLoader.cxx index 59d55db0203..8ee60466db8 100644 --- a/StRoot/StvMaker/StvHitLoader.cxx +++ b/StRoot/StvMaker/StvHitLoader.cxx @@ -226,7 +226,7 @@ static int knt=0;knt++; if (tk->GetHA(x)<1./1000) seed = 0; } } //VP if (mStvHit->IsCombo()) seed = 0; - hard *= (uint)kMaxDetectorId; hard+=(uint)did; + hard *= (unsigned int)kMaxDetectorId; hard+=(unsigned int)did; const StHitPlane *hp = tgh->AddHit(mStvHit,mDetId,xyz,hard,seed); sure = tgh->IsGoodHit();