On 9/8/2014 8:15 AM, Martin Landa wrote:
Hi all,

I was trying to change a default value of bForce in
OGRVFKLayer::GetFeatureCount() to FALSE [1], but when I debug eg.
ogrinfo, it still reports bForce as TRUE (1)

Breakpoint 1, OGRVFKLayer::GetFeatureCount (this=0x71a7d0, bForce=1)
at ogrvfklayer.cpp:162

Any idea what could be wrong?

Thanks in advance, Martin

[1] http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/vfk/ogr_vfk.h#L83

What you describe should work. (See this stackoverflow post).
I do tend to agree with Even that changing the default seems like a bad practice, since existing code that relies on the original default could end up calling your new code and have unexpected behavior.

Maybe I'm not understanding what your link to the repository is supposed to show, but when I look at the linked to the repository code, I see

83     int                  GetFeatureCount(int = TRUE);

ie, you have not changed the default to FALSE as you intended. If this is the code you're compiling, it would certainly explain your problem.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to