<div dir="ltr"><div>Hi,</div><div><br></div><div>maybe you can use<br></div><div><br></div><div>

<pre style="margin:0px;text-indent:0px">#<span style="color:rgb(0,0,128)">define</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">FID_NULL</span><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,0,128)">std</span>::<span style="color:rgb(0,0,128)">numeric_limits</span><<span style="color:rgb(0,0,128)">QgsFeatureId</span>>::<span style="color:rgb(0,0,128)">min</span>()<br><br><br></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 15, 2021 at 10:40 AM Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">While writing unit test for QgsFeatureRequest in core I found<br>
that the filterFid() method for the default-constructed<br>
QgsFeatureRequest returns -1 rather than what a default-constructed<br>
QgsFeatureId() would return (0)<br>
<br>
So I've been wondering: *should* a QgsFeatureFid have a default<br>
value of -1 instead ? More generically: does QGIS make any assumption<br>
about *which* special value of QgsFeatureFid means "no fid" ?<br>
<br>
If there's no such notion as an "unspecified FID" then I wonder<br>
why QgsFeatureRequest is taking the effort of specifying a default<br>
value of it different from the default, and if there's a good reason<br>
it should probably be documented there.<br>
<br>
--strk; <br>
<br>
  Libre GIS consultant/developer<br>
  <a href="https://strk.kbt.io/services.html" rel="noreferrer" target="_blank">https://strk.kbt.io/services.html</a><br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Alessandro Pasotti</div><div>QCooperative:  <a href="https://www.qcooperative.net" target="_blank">www.qcooperative.net</a><br></div>ItOpen:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>