SMH110 / widgets

1 stars 0 forks source link

Operator methods have lots of duplicated code #24

Closed massimocode closed 8 years ago

massimocode commented 8 years ago

We could fix this by having an operator function that takes the operator as a parameter. We would keep the addDivision, addPlus, etc methods but all they would do is call this operator function. This common function would not be on the API. This would greatly reduce the amount of code we have.

SMH110 commented 8 years ago

Done here c38b14eca8648feedad5bcaa010a5e161c65a428

massimocode commented 8 years ago

I've reopened this issue because it said

We would keep the addDivision, addPlus, etc methods but all they would do is call this operator function

But these methods have been deleted

SMH110 commented 8 years ago

Fixed here 45c012c9eeb525ca5c0a5128a9def991973a5370

SMH110 commented 8 years ago

Finalised in https://github.com/SMH110/My-Calculator/pull/28