fixed some 'int' vs 'unsigned int' warnings

This commit is contained in:
nemu
2008-01-15 09:55:30 +00:00
parent a2950df25b
commit e712735cb6
4 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ PRunBase::PRunBase(PMsrHandler *msrInfo, PRunDataHandler *rawData, unsigned int
{
fValid = true;
fRunNo = runNo;
fRunNo = static_cast<int>(runNo);
if ((runNo < 0) || (runNo > msrInfo->GetMsrRunList()->size())) {
fRunInfo = 0;
return;

View File

@ -526,9 +526,9 @@ double PTheory::Func(register double t, const vector<double>& paramValues, const
*
* \param name
*/
unsigned int PTheory::SearchDataBase(TString name)
int PTheory::SearchDataBase(TString name)
{
unsigned int idx = THEORY_UNDEFINED;
int idx = THEORY_UNDEFINED;
for (unsigned int i=0; i<THEORY_MAX; i++) {
if (!name.CompareTo(fgTheoDataBase[i].fName, TString::kIgnoreCase) ||
@ -557,7 +557,7 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
char substr[256];
TObjArray *tokens = 0;
TObjString *ostr;
unsigned int idx = THEORY_UNDEFINED;
int idx = THEORY_UNDEFINED;
for (unsigned int i=1; i<fullTheoryBlock->size(); i++) {
// get the line to be prettyfied
@ -580,7 +580,7 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
}
}
// check if theory is indeed defined. This should not be necessay at this point but ...
if (idx == (unsigned int)THEORY_UNDEFINED)
if (idx == THEORY_UNDEFINED)
continue;
// check that there enough tokens. This should not be necessay at this point but ...
if ((unsigned int)tokens->GetEntries() < fgTheoDataBase[idx].fNoOfParam + 1)

View File

@ -77,7 +77,7 @@ class PRunBase
protected:
bool fValid;
unsigned int fRunNo; ///< number of the run within the msr file
int fRunNo; ///< number of the run within the msr file
PMsrHandler *fMsrInfo; ///< msr-file handler
PMsrRunStructure *fRunInfo; ///< run info used to filter out needed infos for the run
PRunDataHandler *fRawData; ///< holds the raw run data

View File

@ -166,7 +166,7 @@ class PTheory
virtual double Func(register double t, const vector<double>& paramValues, const vector<double>& funcValues) const;
private:
virtual unsigned int SearchDataBase(TString name);
virtual int SearchDataBase(TString name);
virtual void MakeCleanAndTidyTheoryBlock(PMsrLines* fullTheoryBlock);
virtual double Asymmetry(const vector<double>& paramValues, const vector<double>& funcValues) const;