diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-04 03:18:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-04 03:18:46 +0300 |
commit | 5612fb3a7f20a9385ba786bb25d25081b86259dd (patch) | |
tree | a7548d655f6f8d8298d94ce2f433dd287cde78bd /src/gui | |
parent | 4431f40818f832e2cbae061927bdf59904cf5d3b (diff) | |
download | manaverse-5612fb3a7f20a9385ba786bb25d25081b86259dd.tar.gz manaverse-5612fb3a7f20a9385ba786bb25d25081b86259dd.tar.bz2 manaverse-5612fb3a7f20a9385ba786bb25d25081b86259dd.tar.xz manaverse-5612fb3a7f20a9385ba786bb25d25081b86259dd.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 2 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 4 | ||||
-rw-r--r-- | src/gui/theme.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/colorpage.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/extendedlistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/serverslistbox.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 6 | ||||
-rw-r--r-- | src/gui/windowmenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shortcutwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 6 |
14 files changed, 21 insertions, 21 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 60ce059ea..04c9e3ada 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -530,7 +530,7 @@ void Gui::draw() void Gui::videoResized() const { - WindowContainer *const top = static_cast<WindowContainer* const>(getTop()); + WindowContainer *const top = static_cast<WindowContainer *>(getTop()); if (top) { diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 0cbc596fd..69fd7d879 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1175,8 +1175,8 @@ void PopupMenu::handleLink(const std::string &link, { const bool isHome = (mMapItem->getType() == CAST_S32(MapItemType::HOME)); - const int x = static_cast<const int>(mMapItem->getX()); - const int y = static_cast<const int>(mMapItem->getY()); + const int x = static_cast<int>(mMapItem->getX()); + const int y = static_cast<int>(mMapItem->getY()); specialLayer->setTile(x, y, CAST_S32(MapItemType::EMPTY)); specialLayer->updateCache(); diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 8a7b5ff41..5eda09a36 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -906,7 +906,7 @@ static int readColorType(const std::string &type) static Color readColor(const std::string &description) { - const int size = static_cast<const int>(description.length()); + const int size = static_cast<int>(description.length()); if (size < 7 || description[0] != '#') { logger->log("Error, invalid theme color palette: %s", diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 126e3f2b4..c81798e29 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -112,7 +112,7 @@ void AvatarListBox::draw(Graphics *const graphics) if (!parent) return; - AvatarListModel *const model = static_cast<AvatarListModel *const>( + AvatarListModel *const model = static_cast<AvatarListModel *>( mListModel); updateAlpha(); @@ -357,7 +357,7 @@ void AvatarListBox::safeDraw(Graphics *const graphics) if (!parent) return; - AvatarListModel *const model = static_cast<AvatarListModel *const>( + AvatarListModel *const model = static_cast<AvatarListModel *>( mListModel); updateAlpha(); @@ -598,7 +598,7 @@ void AvatarListBox::mousePressed(MouseEvent &event) setSelected(y); distributeActionEvent(); const int selected = getSelected(); - AvatarListModel *const model = static_cast<AvatarListModel *const>( + AvatarListModel *const model = static_cast<AvatarListModel *>( mListModel); if (!model) return; diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp index fbbe93d2c..f29540c0f 100644 --- a/src/gui/widgets/colorpage.cpp +++ b/src/gui/widgets/colorpage.cpp @@ -55,7 +55,7 @@ void ColorPage::draw(Graphics *const graphics) { BLOCK_START("ColorPage::draw") - const ColorModel *const model = static_cast<ColorModel* const>( + const ColorModel *const model = static_cast<const ColorModel*>( mListModel); mHighlightColor.a = CAST_U32(mAlpha * 255.0F); diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 17bb7bc32..eb848f4d6 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -234,7 +234,7 @@ void DropDown::draw(Graphics *const graphics) { const int sel = mPopup->getSelected(); ExtendedListModel *const model2 - = static_cast<ExtendedListModel *const>(model); + = static_cast<ExtendedListModel *>(model); const Image *const image = model2->getImageAt(sel); if (!image) { diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index caf1aaefd..921dfee7f 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -55,7 +55,7 @@ void ExtendedListBox::draw(Graphics *const graphics) return; BLOCK_START("ExtendedListBox::draw") - ExtendedListModel *const model = static_cast<ExtendedListModel* const>( + ExtendedListModel *const model = static_cast<ExtendedListModel *>( mListModel); updateAlpha(); diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h index f0815ba19..fb45dd01a 100644 --- a/src/gui/widgets/serverslistbox.h +++ b/src/gui/widgets/serverslistbox.h @@ -51,7 +51,7 @@ class ServersListBox final : public ListBox return; ServersListModel *const model - = static_cast<ServersListModel *const>(mListModel); + = static_cast<ServersListModel *>(mListModel); updateAlpha(); diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 4317c86f1..6df39dfe6 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -384,7 +384,7 @@ void TabbedArea::mousePressed(MouseEvent &event) { Widget *const widget = mTabContainer->getWidgetAt( event.getX(), event.getY()); - Tab *const tab = dynamic_cast<Tab *const>(widget); + Tab *const tab = dynamic_cast<Tab *>(widget); if (tab) { @@ -475,7 +475,7 @@ void TabbedArea::widgetResized(const Event &event A_UNUSED) - mWidgetContainer->getY() - widgetFrameSize; Widget *const w = getCurrentWidget(); - ScrollArea *const scr = dynamic_cast<ScrollArea *const>(w); + ScrollArea *const scr = dynamic_cast<ScrollArea *>(w); if (scr) { if (mFollowDownScroll && height != 0) @@ -638,7 +638,7 @@ void TabbedArea::adjustTabPositions() void TabbedArea::action(const ActionEvent& actionEvent) { Widget *const source = actionEvent.getSource(); - Tab *const tab = dynamic_cast<Tab *const>(source); + Tab *const tab = dynamic_cast<Tab *>(source); if (tab) { diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index d193ffaa0..e9a37b2d4 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -305,7 +305,7 @@ void WindowMenu::mouseMoved(MouseEvent &event) return; } - const Button *const btn = dynamic_cast<const Button *const>( + const Button *const btn = dynamic_cast<const Button *>( event.getSource()); if (!btn) diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 7e303af28..7f4f4600b 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -707,7 +707,7 @@ void InventoryWindow::mouseMoved(MouseEvent &event) } else { - const Button *const btn = dynamic_cast<const Button *const>(src); + const Button *const btn = dynamic_cast<const Button *>(src); if (!btn) { textPopup->hide(); diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 9b12ee1fd..2cee038bd 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -319,7 +319,7 @@ void Minimap::draw2(Graphics *const graphics) if (!(*it) || (*it)->getType() == ActorType::FloorItem) continue; - const Being *const being = static_cast<const Being *const>(*it); + const Being *const being = static_cast<const Being *>(*it); if (!being) continue; diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp index ee135f12d..be96b6416 100644 --- a/src/gui/windows/shortcutwindow.cpp +++ b/src/gui/windows/shortcutwindow.cpp @@ -193,7 +193,7 @@ void ShortcutWindow::widgetHidden(const Event &event) mItems->widgetHidden(event); if (mTabs) { - ScrollArea *const scroll = static_cast<ScrollArea *const>( + ScrollArea *const scroll = static_cast<ScrollArea *>( mTabs->getCurrentWidget()); if (scroll) { diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 992ec3a1f..9a99c32ca 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -158,7 +158,7 @@ void SkillDialog::action(const ActionEvent &event) { if (!playerHandler) return; - const SkillTab *const tab = static_cast<const SkillTab *const>( + const SkillTab *const tab = static_cast<const SkillTab *>( mTabs->getSelectedTab()); if (tab) { @@ -168,7 +168,7 @@ void SkillDialog::action(const ActionEvent &event) } else if (eventId == "sel") { - const SkillTab *const tab = static_cast<const SkillTab *const>( + const SkillTab *const tab = static_cast<const SkillTab *>( mTabs->getSelectedTab()); if (tab) { @@ -196,7 +196,7 @@ void SkillDialog::action(const ActionEvent &event) } else if (eventId == "use") { - const SkillTab *const tab = static_cast<const SkillTab *const>( + const SkillTab *const tab = static_cast<const SkillTab *>( mTabs->getSelectedTab()); if (tab) { |