IMO the default value should be FID_NULL, IIRC 0 is a valid fid for some
providers.

On Fri, Oct 15, 2021 at 11:50 AM Sandro Santilli <[email protected]> wrote:

> On Fri, Oct 15, 2021 at 10:45:52AM +0200, Alessandro Pasotti wrote:
> > Hi,
> >
> > maybe you can use
> >
> > #define FID_NULL            std::numeric_limits<QgsFeatureId>::min()
>
> Maybe, but the question is more generic: *should* a QgsFeatureId have
> a default value ? In that case maybe we could change its definition
> from a typedef to a class and define such default value ? OR keep
> it a typedef and consider 0 (the current typedefe'd type default)
> as meaning NULL (can we ensure no *real* feature would ever have a
> fid value of 0, from every provider?).
>
> --strk;
>
>

-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to