summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-09 21:35:00 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-09 21:35:00 +0300
commita5b3bda1045078766fd24c64f73bbcc93dd2ac03 (patch)
treeb1deeba6a45d9d2ae03a4bb1f97c131e77234c2b /src/gui
parent0e2f673e74b2817029653f418a88f6ae8ac2ff74 (diff)
downloadmv-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.gz
mv-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.bz2
mv-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.tar.xz
mv-a5b3bda1045078766fd24c64f73bbcc93dd2ac03.zip
Fix type casting in itemamount window class.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemamountwindow.cpp6
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;
}