Linux fixes

This commit is contained in:
Jacob Storen 2015-10-14 07:13:45 -07:00
parent 021de1444d
commit 10046eed4a
6 changed files with 8 additions and 8 deletions

View File

@ -79,7 +79,7 @@ QList<caf::PdmOptionItemInfo> RicLinkVisibleViewsFeatureUi::calculateValueOption
if (fieldNeedingOptions == &m_masterView)
{
for (int i = 0; i < m_allViews.size(); i++)
for (size_t i = 0; i < m_allViews.size(); i++)
{
RimCase* rimCase = NULL;
m_allViews[i]->firstAnchestorOrThisOfType(rimCase);

View File

@ -246,7 +246,7 @@ void RivGeoMechVizLogic::calculateCurrentTotalCellVisibility(cvf::UByteArray* to
if (gridCount == 0) return;
RigFemPart* part = m_geomechView->geoMechCase()->geoMechData()->femParts()->part(0);
size_t elmCount = part->elementCount();
int elmCount = part->elementCount();
totalVisibility->resize(elmCount);
totalVisibility->setAll(false);

View File

@ -21,9 +21,9 @@ TEST(RimWellLogExtractionCurveImplTest, StripOffInvalidValAtEndsOfVector)
std::vector< std::pair<size_t, size_t> > valuesIntervals;
RimWellLogCurveImpl::calculateIntervalsOfValidValues(values, valuesIntervals);
EXPECT_EQ(1, valuesIntervals.size());
EXPECT_EQ(2, valuesIntervals[0].first);
EXPECT_EQ(4, valuesIntervals[0].second);
EXPECT_EQ(1, static_cast<int>(valuesIntervals.size()));
EXPECT_EQ(2, static_cast<int>(valuesIntervals[0].first));
EXPECT_EQ(4, static_cast<int>(valuesIntervals[0].second));
}

View File

@ -83,7 +83,7 @@ void RimWellLogCurveImpl::calculateIntervalsOfValidValues(const std::vector<doub
vIdx++;
}
if (startIdx >= 0 && startIdx < valueCount)
if (startIdx >= 0 && startIdx < ((int)valueCount))
{
intervals.push_back(std::make_pair(startIdx, valueCount - 1));
}

View File

@ -231,7 +231,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHand
return NULL;
}
if (index > childObjects.size() - 1)
if (index < 0 || index > ((int)childObjects.size()) - 1)
{
return NULL;
}

View File

@ -155,7 +155,7 @@ namespace NRLib {
virtual const std::map<int, std::string> GetDiscNames(const std::string& log_name) const;
const unsigned int GetNumberOfNonMissingData() const {return n_data_nonmissing_ ;}
unsigned int GetNumberOfNonMissingData() const {return n_data_nonmissing_ ;}
void SetUseForBackgroundTrend(int use_for_background_trend) { use_for_background_trend_ = use_for_background_trend ;}
void SetUseForFiltering(int use_for_filtering) { use_for_filtering_ = use_for_filtering ;}