vpiotr / decimal_for_cpp

Decimal data type for C++
273 stars 68 forks source link

this.m_value should be this->m_value for decimal::operator/= #22

Closed Think7 closed 8 years ago

Think7 commented 8 years ago

Hello,

Firstly, thank you very much for creating and publishing this wonderful library!

When adding to my project, i got a bunch of compiler errors similar to the one below.

../MehProject/./LIBS/decimal_for_cpp-master/include/decimal.h:403:29: error: member reference base type 'decimal<Prec, RoundPolicy> *' is not a structure or union
                multDiv(this.m_value, 1, rhs);
                        ~~~~^~~~~~~~

The method is defined using this.m_value to access the classes m_value dec_storage_t value when it should be a ->. Changing this allows the project to compile and now the arguments to the functions being called make sense.

vpiotr commented 8 years ago

Thanks for pointing this issue - the code was not used that's why compilation of unit tests didn't fail. There were some other fixes - please update your copy.

Think7 commented 8 years ago

Hey,

Just want to say thank you again for creating, maintaining, and graciously open sourcing this wonderful library. I've been using it like mad in my latest 2 projects and am so happy to have found it. If there is anything i can ever do to contribute or help you in some way please don't hesitate to ask.

Please accept a friendship pineapple as a token of my sincere gratitude: 🍍

vpiotr commented 8 years ago

LOL, thank you for this pineapple, you made my day :-) I hope I will be able to publish more code in the future. If you have some spare time you can look at foundbit dot com and tell me what you think about it. Any feedback is welcome. Thanks, P.