GNOME Bugzilla – Bug 672926
history-service: assorted cleanups
Last modified: 2012-03-28 21:48:10 UTC
These patches fix a few things I found while reading the code.
Created attachment 210702 [details] [review] history-service: remove unused variables
Created attachment 210703 [details] [review] history-service: remove unnecessary type cast
Created attachment 210704 [details] [review] history-service: simplify sort function
Review of attachment 210702 [details] [review]: OK.
Review of attachment 210703 [details] [review]: Ok.
Review of attachment 210704 [details] [review]: I don't think it's a goal for this code to be as short as possible. Do you think this is easier to read?
(In reply to comment #6) > Review of attachment 210704 [details] [review]: > > I don't think it's a goal for this code to be as short as possible. Do you > think this is easier to read? Absolutely.
(In reply to comment #7) > > I don't think it's a goal for this code to be as short as possible. Do you > > think this is easier to read? > > Absolutely. Maybe I'm an old-timer, but for me compare methods usually follow that style, so it's easier to figure what's going on if they are like that. For instance, this is how the example in the GNOME doc does an example for the sort method of a queue: 7 return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); Anyway, no big deal, so I say let's leave it like it is.
Attachment 210702 [details] pushed as ce80dce - history-service: remove unused variables Attachment 210703 [details] pushed as aaa40d7 - history-service: remove unnecessary type cast