Skip to content

Commit

Permalink
MSVC 2015 compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jun 14, 2022
1 parent 87dbdd6 commit 6d3e9d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/generic/ograrrowarrayhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OGRArrowArrayHelper::OGRArrowArrayHelper(GDALDataset* poDS,
for(int i = 0; i < nFieldCount; i++ )
{
const auto poFieldDefn = poFeatureDefn->GetFieldDefn(i);
abNullableFields[i] = poFieldDefn->IsNullable();
abNullableFields[i] = CPL_TO_BOOL(poFieldDefn->IsNullable());
if( !poFieldDefn->IsIgnored() )
{
mapOGRFieldToArrowField[i] = nChildren;
Expand Down
2 changes: 2 additions & 0 deletions ogr/ogrsf_frmts/generic/ograrrowarrayhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

//! @cond Doxygen_Suppress

#include <algorithm>

#include "cpl_time.h"

#include "ogrsf_frmts.h"
Expand Down
4 changes: 2 additions & 2 deletions ogr/ogrsf_frmts/generic/ogrlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5480,7 +5480,7 @@ static bool FillWKBGeometryArray(struct ArrowArray* psChild,
const OGRGeomFieldDefn* poFieldDefn,
const int i)
{
const bool bIsNullable = poFieldDefn->IsNullable();
const bool bIsNullable = CPL_TO_BOOL(poFieldDefn->IsNullable());
psChild->n_buffers = 3;
psChild->buffers = static_cast<const void**>(CPLCalloc(3, sizeof(void*)));
uint8_t* pabyNull = nullptr;
Expand Down Expand Up @@ -5814,7 +5814,7 @@ int OGRLayer::GetNextArrowArray(struct ArrowArrayStream*,
++iSchemaChild;
psChild->release = OGRLayerDefaultReleaseArray;
psChild->length = apoFeatures.size();
const bool bIsNullable = poFieldDefn->IsNullable();
const bool bIsNullable = CPL_TO_BOOL(poFieldDefn->IsNullable());
const auto eSubType = poFieldDefn->GetSubType();
switch( poFieldDefn->GetType() )
{
Expand Down

0 comments on commit 6d3e9d1

Please sign in to comment.