diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-09 21:35:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-09 21:35:00 +0300 |
commit | a5b3bda1045078766fd24c64f73bbcc93dd2ac03 (patch) | |
tree | b1deeba6a45d9d2ae03a4bb1f97c131e77234c2b /src | |
parent | 0e2f673e74b2817029653f418a88f6ae8ac2ff74 (diff) | |
download | manaverse-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.gz manaverse-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.bz2 manaverse-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.xz manaverse-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.zip |
Fix type casting in itemamount window class.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemamountwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp index 3e22246b5..1751f6043 100644 --- a/src/gui/itemamountwindow.cpp +++ b/src/gui/itemamountwindow.cpp @@ -388,18 +388,18 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) if (event.getId() == "incPrice") { mPrice++; - price = static_cast<int>(pow(10, mPrice)); + price = static_cast<int>(pow(10.0, mPrice)); } else if (event.getId() == "decPrice") { mPrice--; - price = static_cast<int>(pow(10, mPrice)); + price = static_cast<int>(pow(10.0, mPrice)); } else if (event.getId() == "slidePrice") { price = static_cast<int>(mItemPriceSlide->getValue()); if (price) - mPrice = static_cast<int>(log(price)); + mPrice = static_cast<int>(log(static_cast<float>(price))); else mPrice = 0; } |