On Fri, Aug 26, 2016 at 14:37:42 -0700, Brett Harrison wrote: > + if (diff != 0) { > + return diff > 0 ? 1 : diff < 0 ? -1 : 0; > + }
If diff != 0, it can only be >0 or <0, nothing else: if (diff != 0) return diff > 0 ? 1 : -1; (And you can drop the curly brackets.) > + else { > + int64_t diff = (int64_t)a->fontsize - (int64_t)bb->fontsize; > + return diff > 0 ? 1 : diff < 0 ? -1 : 0; > + } There's a macro for this: else return FFDIFFSIGN((int64_t)a->fontsize, (int64_t)bb->fontsize); Moritz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel