Commit 8e4fb59e authored by Rashad Kanavath's avatar Rashad Kanavath

WRG: fix wsign-compare with int and size_t

parent 009516c1
......@@ -188,7 +188,7 @@ public:
* \invariant <tt>m_Feature != 0</tt>
* \sa \c OGRFeature::GetFieldCount()
*/
size_t GetSize() const;
int GetSize() const;
/**
* Read-Write access to the i-th field.
* \invariant <tt>m_Feature != 0</tt>
......
......@@ -259,7 +259,7 @@ void otb::FieldCopyTransformation::fieldsTransform(
// two fields: "Description" and "Name"
//assert(inFeature.GetSize() == outFeature.GetSize());
for (size_t i=0,N=inFeature.GetSize(); i!=N; ++i)
for (int i=0,N=inFeature.GetSize(); i!=N; ++i)
{
int const indexNewField = m_SourceToDestFieldIndicesMap[i];
outFeature[indexNewField].Assign(inFeature[i]);
......
......@@ -121,7 +121,7 @@ bool otb::ogr::operator==(otb::ogr::Feature const& lhs, otb::ogr::Feature const&
/*===========================================================================*/
/*================================[ Fields ]=================================*/
/*===========================================================================*/
size_t otb::ogr::Feature::GetSize() const {
int otb::ogr::Feature::GetSize() const {
return ogr().GetFieldCount();
}
......
......@@ -713,9 +713,9 @@ BOOST_AUTO_TEST_CASE(Add_n_Read_Fields)
l.CreateField(k_f5);
ogr::Feature g0(defn);
const size_t NbFields = defn.GetFieldCount();
const int NbFields = defn.GetFieldCount();
BOOST_CHECK_EQUAL(NbFields, g0.GetSize());
for (size_t i=0; i!=NbFields; ++i)
for (int i=0; i!=NbFields; ++i)
{
BOOST_ASSERT(!g0[i].HasBeenSet());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment