356ce1b8bab935ad2b79b70c17724d792043804f
Some of the things refactored to the base class: - isPaymentSet() - canPay() - Render() - setSource() - setPayment() - the target instance - duplicated constructor initialization crap I'm not interested in pointing fingers as to how the code got this way, but I'll ask that everyone who's altered this code in one fashion or another to carefully diff this change and understand what I refactored. This code is a poster child for neglect & what happens when people start blindly copy & pasting code instead of paying attention to the commonality between code paths. If you see the same lines of code happening over & over, and you're about to make yet another copy, please stop yourself & think about how you can refactor the code to be in a single shared function (or, more explicitly, a shared base member function when possible). If you don't understand what I mean by a shared base member function, then I would suggest at the very least reading up on this topic: http://www.cplusplus.com/doc/tutorial/inheritance/ (And, after all that, if you're still unsure how to proceed, ping someone else for advice!)
Languages
C++
55.1%
C
38.6%
Objective-C
3.4%
Java
1.5%
HTML
0.8%
Other
0.4%