Hi, maybe you can use
#define FID_NULL std::numeric_limits<QgsFeatureId>::min() On Fri, Oct 15, 2021 at 10:40 AM Sandro Santilli <[email protected]> wrote: > While writing unit test for QgsFeatureRequest in core I found > that the filterFid() method for the default-constructed > QgsFeatureRequest returns -1 rather than what a default-constructed > QgsFeatureId() would return (0) > > So I've been wondering: *should* a QgsFeatureFid have a default > value of -1 instead ? More generically: does QGIS make any assumption > about *which* special value of QgsFeatureFid means "no fid" ? > > If there's no such notion as an "unspecified FID" then I wonder > why QgsFeatureRequest is taking the effort of specifying a default > value of it different from the default, and if there's a good reason > it should probably be documented there. > > --strk; > > Libre GIS consultant/developer > https://strk.kbt.io/services.html > _______________________________________________ > 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 > -- 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
