<div dir="ltr"><div><br></div><div>IMO the default value should be FID_NULL, IIRC 0 is a valid fid for some providers.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 15, 2021 at 11:50 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">On Fri, Oct 15, 2021 at 10:45:52AM +0200, Alessandro Pasotti wrote:<br>
> Hi,<br>
> <br>
> maybe you can use<br>
> <br>
> #define FID_NULL            std::numeric_limits<QgsFeatureId>::min()<br>
<br>
Maybe, but the question is more generic: *should* a QgsFeatureId have<br>
a default value ? In that case maybe we could change its definition<br>
from a typedef to a class and define such default value ? OR keep<br>
it a typedef and consider 0 (the current typedefe'd type default)<br>
as meaning NULL (can we ensure no *real* feature would ever have a<br>
fid value of 0, from every provider?).<br>
<br>
--strk;<br>
<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>