Skip to content

Commit

Permalink
Wrap GetFieldAsDateTime in CPL_TO_BOOL. Fixes r35119.
Browse files Browse the repository at this point in the history
error: ‘MSVCPedanticBool::MSVCPedanticBool(int)’ is private
ogrfeature.cpp:2701:47: error: within this context
ogrfeature.cpp:2746:38: error: within this context


git-svn-id: https://svn.osgeo.org/gdal/trunk@35120 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
schwehr committed Aug 15, 2016
1 parent db0e1c9 commit 15e7060
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gdal/ogr/ogrfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,9 +2696,9 @@ int OGRFeature::GetFieldAsDateTime( int iField,
int *pnTZFlag )
{
float fSecond = 0.0f;
const bool bRet =
const bool bRet = CPL_TO_BOOL(
GetFieldAsDateTime( iField, pnYear, pnMonth, pnDay, pnHour, pnMinute,
&fSecond, pnTZFlag);
&fSecond, pnTZFlag));
if( bRet && pnSecond ) *pnSecond = static_cast<int>(fSecond);
return bRet;
}
Expand Down Expand Up @@ -2739,11 +2739,11 @@ int OGR_F_GetFieldAsDateTime( OGRFeatureH hFeat, int iField,
VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsDateTime", 0 );

float fSecond = 0.0f;
const bool bRet =reinterpret_cast<OGRFeature *>(hFeat)->
const bool bRet = CPL_TO_BOOL(reinterpret_cast<OGRFeature *>(hFeat)->
GetFieldAsDateTime( iField,
pnYear, pnMonth, pnDay,
pnHour, pnMinute,&fSecond,
pnTZFlag );
pnTZFlag ));
if( bRet && pnSecond ) *pnSecond = static_cast<int>(fSecond);
return bRet;
}
Expand Down

0 comments on commit 15e7060

Please sign in to comment.