diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-27 22:30:19 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-27 22:30:19 +0000 |
commit | d61fdaf1932724f86a68484c4a05195ca270646e (patch) | |
tree | c5b9fb13007679401ed0b0937660fac491b69a5c /src/gui/slider.cpp | |
parent | 88b3f92061c703fdf6cf0f970684fb77de6d8795 (diff) | |
download | mana-d61fdaf1932724f86a68484c4a05195ca270646e.tar.gz mana-d61fdaf1932724f86a68484c4a05195ca270646e.tar.bz2 mana-d61fdaf1932724f86a68484c4a05195ca270646e.tar.xz mana-d61fdaf1932724f86a68484c4a05195ca270646e.zip |
Removed useless yet costly dynamic casts.
Diffstat (limited to 'src/gui/slider.cpp')
-rw-r--r-- | src/gui/slider.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/slider.cpp b/src/gui/slider.cpp index 98efc409..f0170a1b 100644 --- a/src/gui/slider.cpp +++ b/src/gui/slider.cpp @@ -109,22 +109,22 @@ void Slider::draw(gcn::Graphics *graphics) int x = 0; int y = (h - hStart->getHeight()) / 2; - dynamic_cast<Graphics*>(graphics)->drawImage(hStart, x, y); + static_cast<Graphics*>(graphics)->drawImage(hStart, x, y); w -= hStart->getWidth() + hEnd->getWidth(); x += hStart->getWidth(); - dynamic_cast<Graphics*>(graphics)->drawImagePattern( - hMid, x, y, w, hMid->getHeight()); + static_cast<Graphics*>(graphics)-> + drawImagePattern(hMid, x, y, w, hMid->getHeight()); x += w; - dynamic_cast<Graphics*>(graphics)->drawImage(hEnd, x, y); + static_cast<Graphics*>(graphics)->drawImage(hEnd, x, y); drawMarker(graphics); } void Slider::drawMarker(gcn::Graphics *graphics) { - dynamic_cast<Graphics*>(graphics)->drawImage(hGrip, - getMarkerPosition(), (getHeight() - hGrip->getHeight()) / 2); + static_cast<Graphics*>(graphics)-> + drawImage(hGrip, getMarkerPosition(), (getHeight() - hGrip->getHeight()) / 2); } |