
src/gui/item_amount.cpp:
Code: Select all
amount = static_cast<int>(mItemAmountSlide->getValue());
Code: Select all
mAmountItems = (int) mSlider->getValue();
- Variable or class member, which is preferred? Or, is there a reason to use the one in one place but not in the other? (amount vs mAmountItems)
- How to use one datatype as another? (static cast vs “whatever it is namedâ€ÂÂ)
EDIT (12.57 UTC)
I think I figured out the first question, it seems to be all about scope. I tested to add a function (private class method) and suddenly I believe I realised some things...
EDIT (13.26 UTC)
New question:
• When I tried to make changes in scope and do things in a more advanced way, TMW segmentsfaults.
