Marton Balint (12021-07-27): > > +static inline int ff_between(unsigned min, unsigned max, unsigned val) > > +{ > > + return val - min <= max - min; > > +} > This seems a bit too general. What if somebody needs int and not unsigned? I
Any type smaller than unsigned will be promoted to unsigned, which is exactly what needs to happen. It will not work for larger types, and I think it is ok; the C standard does the same: abs() does not work for int64_t. > just think it is better to not make this ff_*. We cannot hide a static inline function. If you really insist, I can make it a macro and #undef it later, but <PUKE EMOJI>. > > + if (ff_between('0', '9', c)) > > av_isdigit(c) > > > + return c - '0'; > > + c &= ~('a' - 'A'); > > c = av_toupper(c); That would require including avstring.h from internal.h. I do not think these simple functions are worth it. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".