On 07/15/2010 09:35 PM, Ronald S. Bultje wrote:
Hi,

On Thu, Jul 15, 2010 at 3:12 PM, Sebastian Vater
<cdgs.basty-gM/[email protected]>  wrote:
Just a question for understanding...what's the advantage of using enum's
then? The only one I see straight away is that there is less space
required (saving 4 characters by replacing '#define ' with '    ').

Documentation tools (e.g. doxy) will group them together and treat
them as a group of related properties, rather than separate entities.
That's a big one for a huge project such as FFmpeg, where in the
future many people will look at and modify your code, without
necessarily understanding everything at the beginning.

Not to mention having variables of the type "enum Whatever" instead of a plain int, which tell immediately which kind of constants should be assigned to it.

-Vitor
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to