GNOME Bugzilla – Bug 681028
Remove some of the copy/pasted code in miners
Last modified: 2012-08-07 17:47:28 UTC
Replace it with proper code sharing, which is inheritance.
Created attachment 220108 [details] [review] Move some tracker helpers to gd-miner-tracker.c Remove the amount of code duplication here.
Created attachment 220109 [details] [review] miner: Reduce copy/pasted code with inheritance A large amount of the code in each miner is copy/pasted. We can do better than this. Define a base subclass that does most of the work, and override the parts that are different in each subclass. While we're at it, deduplicate the miner main start, as well.
Attachment 220108 [details] pushed as 9482646 - Move some tracker helpers to gd-miner-tracker.c Attachment 220109 [details] pushed as 32686b5 - miner: Reduce copy/pasted code with inheritance Thanks a lot Jasper, this cleanup was long overdue and makes the code so much nicer! Since I wanted to include these in today's release, I pushed them with a couple of fixes to git master.