On Mon, 1 Dec 2014, Vittorio Giovara wrote:
On Sat, Nov 29, 2014 at 9:58 PM, Martin Storsjö <[email protected]> wrote:
On Sat, 29 Nov 2014, Vittorio Giovara wrote:
Alphabetically order the list by the tag to facilitate the insertion of
new ones. Align the 'break' clauses to allow more space to the tag
handling.
---
libavformat/mov.c | 70
+++++++++++++++++++++++++++----------------------------
1 file changed, 35 insertions(+), 35 deletions(-)
I'm not sure if the aligned break statements is an improvement, I don't see
how it would help and IMO it looks worse, but others may have a different
opinion. The reordering itself is ok.
I aligned the 'breaks' because we can have very long tags like
'playbackrequirements' and I wanted to be able to add code on the same
line, such as in the next patch.
Aligning stuff excessively hurts readability though. Think of
int foo = 42;
For stuff like the trailing \ in macros, it doesn't matter since it's just
better if you don't read it, but for things like a break here, it does
hurt.
+ case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break;
Would you prefer me to handle those separately and move the breaks
closer to the tags?
Yes, keep the breaks aligned like they are currently (with a sensible
amount of padding while keeping it readable), and for lines that don't fit
within that, let it overflow (or split over multiple lines or whatever).
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel