From 8ca3c3b123daeb026552de39fdf5182fa0263b49 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Fri, 16 Oct 2020 22:18:54 +0400 Subject: [PATCH] Mark overrided methods by override keyword --- CMakeLists.txt | 4 + apps/launcher/maindialog.hpp | 2 +- apps/launcher/utils/lineedit.hpp | 2 +- apps/launcher/utils/textinputdialog.hpp | 2 +- apps/opencs/main.cpp | 2 +- apps/opencs/model/doc/savingstages.hpp | 48 +- apps/opencs/model/filter/andnode.hpp | 4 +- apps/opencs/model/filter/booleannode.hpp | 6 +- apps/opencs/model/filter/leafnode.hpp | 2 +- apps/opencs/model/filter/narynode.hpp | 4 +- apps/opencs/model/filter/notnode.hpp | 4 +- apps/opencs/model/filter/ornode.hpp | 4 +- apps/opencs/model/filter/textnode.hpp | 8 +- apps/opencs/model/filter/unarynode.hpp | 4 +- apps/opencs/model/filter/valuenode.hpp | 8 +- apps/opencs/model/prefs/boolsetting.hpp | 4 +- apps/opencs/model/prefs/coloursetting.hpp | 4 +- apps/opencs/model/prefs/doublesetting.hpp | 4 +- apps/opencs/model/prefs/enumsetting.hpp | 4 +- apps/opencs/model/prefs/intsetting.hpp | 4 +- apps/opencs/model/prefs/modifiersetting.hpp | 6 +- .../model/prefs/shortcuteventhandler.hpp | 2 +- apps/opencs/model/prefs/shortcutsetting.hpp | 6 +- apps/opencs/model/tools/birthsigncheck.hpp | 4 +- apps/opencs/model/tools/bodypartcheck.hpp | 4 +- apps/opencs/model/tools/classcheck.hpp | 4 +- apps/opencs/model/tools/enchantmentcheck.hpp | 4 +- apps/opencs/model/tools/factioncheck.hpp | 4 +- apps/opencs/model/tools/gmstcheck.hpp | 4 +- apps/opencs/model/tools/journalcheck.hpp | 4 +- apps/opencs/model/tools/magiceffectcheck.hpp | 4 +- apps/opencs/model/tools/mandatoryid.hpp | 4 +- apps/opencs/model/tools/mergeoperation.hpp | 2 +- apps/opencs/model/tools/mergestages.hpp | 36 +- apps/opencs/model/tools/pathgridcheck.hpp | 4 +- apps/opencs/model/tools/racecheck.hpp | 4 +- .../opencs/model/tools/referenceablecheck.hpp | 4 +- apps/opencs/model/tools/referencecheck.hpp | 4 +- apps/opencs/model/tools/regioncheck.hpp | 4 +- apps/opencs/model/tools/reportmodel.hpp | 10 +- apps/opencs/model/tools/scriptcheck.hpp | 8 +- apps/opencs/model/tools/searchstage.hpp | 4 +- apps/opencs/model/tools/skillcheck.hpp | 4 +- apps/opencs/model/tools/soundcheck.hpp | 4 +- apps/opencs/model/tools/soundgencheck.hpp | 4 +- apps/opencs/model/tools/spellcheck.hpp | 4 +- apps/opencs/model/tools/startscriptcheck.hpp | 4 +- apps/opencs/model/tools/topicinfocheck.hpp | 4 +- apps/opencs/model/world/collection.hpp | 46 +- apps/opencs/model/world/columnbase.hpp | 8 +- apps/opencs/model/world/columnimp.hpp | 508 +++++++-------- apps/opencs/model/world/commands.hpp | 38 +- apps/opencs/model/world/idtable.hpp | 31 +- apps/opencs/model/world/idtableproxymodel.hpp | 6 +- apps/opencs/model/world/idtree.hpp | 19 +- apps/opencs/model/world/infocollection.hpp | 6 +- .../model/world/infotableproxymodel.hpp | 10 +- .../model/world/nestedcoladapterimp.hpp | 278 ++++----- .../opencs/model/world/nestedidcollection.hpp | 18 +- .../model/world/nestedinfocollection.hpp | 18 +- .../model/world/nestedtableproxymodel.hpp | 20 +- .../opencs/model/world/nestedtablewrapper.hpp | 2 +- apps/opencs/model/world/record.hpp | 6 +- apps/opencs/model/world/refidadapterimp.hpp | 589 +++++++++--------- apps/opencs/model/world/refidcollection.hpp | 62 +- apps/opencs/model/world/refiddata.hpp | 18 +- apps/opencs/model/world/regionmap.hpp | 8 +- apps/opencs/model/world/resourcetable.hpp | 29 +- apps/opencs/model/world/scriptcontext.hpp | 12 +- apps/opencs/model/world/subcellcollection.hpp | 2 +- apps/opencs/model/world/tablemimedata.hpp | 2 +- apps/opencs/view/doc/loader.hpp | 2 +- apps/opencs/view/doc/newgame.hpp | 2 +- apps/opencs/view/doc/runlogsubview.hpp | 2 +- apps/opencs/view/doc/sizehint.hpp | 2 +- apps/opencs/view/doc/subview.hpp | 4 +- apps/opencs/view/doc/subviewfactoryimp.hpp | 4 +- apps/opencs/view/doc/view.hpp | 2 +- apps/opencs/view/filter/filterbox.hpp | 6 +- apps/opencs/view/prefs/contextmenulist.hpp | 4 +- apps/opencs/view/prefs/dialogue.hpp | 2 +- apps/opencs/view/prefs/pagebase.hpp | 2 +- apps/opencs/view/render/cameracontroller.hpp | 12 +- apps/opencs/view/render/cell.cpp | 2 +- apps/opencs/view/render/cellarrow.hpp | 2 +- apps/opencs/view/render/editmode.hpp | 10 +- apps/opencs/view/render/instancemode.hpp | 34 +- .../view/render/instanceselectionmode.hpp | 2 +- apps/opencs/view/render/lighting.cpp | 2 +- apps/opencs/view/render/lightingbright.hpp | 6 +- apps/opencs/view/render/lightingday.hpp | 6 +- apps/opencs/view/render/lightingnight.hpp | 6 +- apps/opencs/view/render/object.hpp | 2 +- apps/opencs/view/render/orbitcameramode.hpp | 6 +- .../view/render/pagedworldspacewidget.hpp | 64 +- apps/opencs/view/render/pathgrid.cpp | 2 +- apps/opencs/view/render/pathgrid.hpp | 2 +- apps/opencs/view/render/pathgridmode.hpp | 24 +- .../view/render/pathgridselectionmode.hpp | 2 +- apps/opencs/view/render/scenewidget.hpp | 4 +- apps/opencs/view/render/selectionmode.hpp | 2 +- apps/opencs/view/render/terrainstorage.hpp | 2 +- .../view/render/unpagedworldspacewidget.hpp | 57 +- apps/opencs/view/render/worldspacewidget.hpp | 12 +- apps/opencs/view/tools/merge.hpp | 2 +- apps/opencs/view/tools/reportsubview.hpp | 2 +- apps/opencs/view/tools/reporttable.cpp | 4 +- apps/opencs/view/tools/reporttable.hpp | 8 +- apps/opencs/view/tools/searchsubview.hpp | 6 +- apps/opencs/view/widget/coloreditor.hpp | 4 +- apps/opencs/view/widget/colorpickerpopup.hpp | 4 +- apps/opencs/view/widget/completerpopup.hpp | 2 +- apps/opencs/view/widget/droplineedit.hpp | 6 +- apps/opencs/view/widget/pushbutton.hpp | 6 +- apps/opencs/view/widget/scenetool.hpp | 2 +- apps/opencs/view/widget/scenetoolbar.hpp | 2 +- apps/opencs/view/widget/scenetoolmode.hpp | 6 +- apps/opencs/view/widget/scenetoolrun.hpp | 4 +- .../view/widget/scenetoolshapebrush.hpp | 8 +- .../view/widget/scenetooltexturebrush.hpp | 8 +- apps/opencs/view/widget/scenetooltoggle.hpp | 2 +- apps/opencs/view/widget/scenetooltoggle2.hpp | 2 +- apps/opencs/view/world/bodypartcreator.hpp | 6 +- apps/opencs/view/world/cellcreator.hpp | 12 +- apps/opencs/view/world/colordelegate.hpp | 8 +- apps/opencs/view/world/creator.hpp | 4 +- .../opencs/view/world/datadisplaydelegate.hpp | 8 +- apps/opencs/view/world/dialoguecreator.hpp | 6 +- apps/opencs/view/world/dialoguespinbox.hpp | 12 +- apps/opencs/view/world/dialoguesubview.hpp | 34 +- apps/opencs/view/world/dragrecordtable.hpp | 6 +- apps/opencs/view/world/enumdelegate.hpp | 22 +- .../world/extendedcommandconfigurator.hpp | 2 +- apps/opencs/view/world/genericcreator.hpp | 16 +- apps/opencs/view/world/globalcreator.hpp | 2 +- .../view/world/idcompletiondelegate.hpp | 12 +- apps/opencs/view/world/idtypedelegate.hpp | 2 +- apps/opencs/view/world/idvalidator.hpp | 2 +- apps/opencs/view/world/infocreator.hpp | 16 +- apps/opencs/view/world/nestedtable.hpp | 4 +- apps/opencs/view/world/pathgridcreator.hpp | 16 +- apps/opencs/view/world/previewsubview.hpp | 4 +- .../view/world/recordstatusdelegate.hpp | 2 +- .../view/world/referenceablecreator.hpp | 10 +- apps/opencs/view/world/referencecreator.hpp | 16 +- apps/opencs/view/world/regionmap.hpp | 10 +- apps/opencs/view/world/regionmapsubview.hpp | 2 +- apps/opencs/view/world/scenesubview.hpp | 8 +- apps/opencs/view/world/scriptedit.hpp | 16 +- apps/opencs/view/world/scripterrortable.hpp | 4 +- apps/opencs/view/world/scripthighlighter.hpp | 28 +- apps/opencs/view/world/scriptsubview.hpp | 6 +- apps/opencs/view/world/startscriptcreator.hpp | 16 +- apps/opencs/view/world/table.hpp | 8 +- apps/opencs/view/world/tablebottombox.hpp | 2 +- apps/opencs/view/world/tablesubview.hpp | 8 +- apps/opencs/view/world/util.hpp | 18 +- apps/opencs/view/world/vartypedelegate.hpp | 8 +- apps/openmw/engine.cpp | 2 +- apps/openmw/mwbase/windowmanager.hpp | 6 +- apps/openmw/mwclass/activator.hpp | 26 +- apps/openmw/mwclass/actor.hpp | 18 +- apps/openmw/mwclass/apparatus.hpp | 32 +- apps/openmw/mwclass/armor.hpp | 50 +- apps/openmw/mwclass/bodypart.hpp | 12 +- apps/openmw/mwclass/book.hpp | 38 +- apps/openmw/mwclass/clothing.hpp | 44 +- apps/openmw/mwclass/container.hpp | 46 +- apps/openmw/mwclass/creature.cpp | 6 +- apps/openmw/mwclass/creature.hpp | 78 +-- apps/openmw/mwclass/creaturelevlist.cpp | 6 +- apps/openmw/mwclass/creaturelevlist.hpp | 14 +- apps/openmw/mwclass/door.cpp | 6 +- apps/openmw/mwclass/door.hpp | 36 +- apps/openmw/mwclass/ingredient.hpp | 32 +- apps/openmw/mwclass/itemlevlist.hpp | 4 +- apps/openmw/mwclass/light.hpp | 48 +- apps/openmw/mwclass/lockpick.hpp | 40 +- apps/openmw/mwclass/misc.hpp | 36 +- apps/openmw/mwclass/npc.cpp | 6 +- apps/openmw/mwclass/npc.hpp | 97 ++- apps/openmw/mwclass/potion.hpp | 32 +- apps/openmw/mwclass/probe.hpp | 40 +- apps/openmw/mwclass/repair.hpp | 37 +- apps/openmw/mwclass/static.hpp | 12 +- apps/openmw/mwclass/weapon.hpp | 50 +- apps/openmw/mwdialogue/dialoguemanagerimp.hpp | 48 +- apps/openmw/mwdialogue/journalimp.hpp | 30 +- apps/openmw/mwdialogue/quest.hpp | 4 +- apps/openmw/mwgui/alchemywindow.hpp | 4 +- apps/openmw/mwgui/birth.hpp | 4 +- apps/openmw/mwgui/bookpage.cpp | 30 +- apps/openmw/mwgui/bookwindow.hpp | 4 +- apps/openmw/mwgui/class.hpp | 18 +- apps/openmw/mwgui/companionitemmodel.hpp | 4 +- apps/openmw/mwgui/companionwindow.hpp | 12 +- apps/openmw/mwgui/confirmationdialog.hpp | 2 +- apps/openmw/mwgui/console.cpp | 2 +- apps/openmw/mwgui/console.hpp | 14 +- apps/openmw/mwgui/container.hpp | 12 +- apps/openmw/mwgui/containeritemmodel.hpp | 18 +- apps/openmw/mwgui/debugwindow.hpp | 2 +- apps/openmw/mwgui/dialogue.cpp | 2 +- apps/openmw/mwgui/dialogue.hpp | 26 +- apps/openmw/mwgui/enchantingdialog.hpp | 14 +- apps/openmw/mwgui/formatting.hpp | 8 +- apps/openmw/mwgui/hud.cpp | 14 +- apps/openmw/mwgui/hud.hpp | 4 +- apps/openmw/mwgui/inventoryitemmodel.hpp | 16 +- apps/openmw/mwgui/inventorywindow.hpp | 10 +- apps/openmw/mwgui/itemmodel.hpp | 14 +- apps/openmw/mwgui/itemselection.hpp | 2 +- apps/openmw/mwgui/jailscreen.hpp | 4 +- apps/openmw/mwgui/journalviewmodel.cpp | 28 +- apps/openmw/mwgui/journalwindow.cpp | 6 +- apps/openmw/mwgui/journalwindow.hpp | 4 +- apps/openmw/mwgui/keyboardnavigation.hpp | 2 +- apps/openmw/mwgui/levelupdialog.hpp | 2 +- apps/openmw/mwgui/loadingscreen.cpp | 4 +- apps/openmw/mwgui/loadingscreen.hpp | 16 +- apps/openmw/mwgui/mainmenu.hpp | 8 +- apps/openmw/mwgui/mapwindow.hpp | 24 +- apps/openmw/mwgui/merchantrepair.hpp | 4 +- apps/openmw/mwgui/messagebox.hpp | 2 +- apps/openmw/mwgui/pickpocketitemmodel.hpp | 16 +- apps/openmw/mwgui/quickkeysmenu.hpp | 10 +- apps/openmw/mwgui/race.hpp | 6 +- apps/openmw/mwgui/recharge.hpp | 4 +- apps/openmw/mwgui/repair.hpp | 4 +- apps/openmw/mwgui/review.hpp | 6 +- apps/openmw/mwgui/savegamedialog.hpp | 4 +- apps/openmw/mwgui/screenfader.hpp | 2 +- apps/openmw/mwgui/scrollwindow.hpp | 4 +- apps/openmw/mwgui/settingswindow.hpp | 4 +- apps/openmw/mwgui/sortfilteritemmodel.hpp | 14 +- apps/openmw/mwgui/spellbuyingwindow.hpp | 10 +- apps/openmw/mwgui/spellcreationdialog.hpp | 16 +- apps/openmw/mwgui/spellicons.hpp | 4 +- apps/openmw/mwgui/spellwindow.hpp | 8 +- apps/openmw/mwgui/statswindow.hpp | 6 +- apps/openmw/mwgui/textinput.hpp | 4 +- apps/openmw/mwgui/tradeitemmodel.hpp | 8 +- apps/openmw/mwgui/tradewindow.hpp | 14 +- apps/openmw/mwgui/trainingwindow.hpp | 12 +- apps/openmw/mwgui/travelwindow.hpp | 4 +- apps/openmw/mwgui/waitdialog.hpp | 12 +- apps/openmw/mwgui/windowbase.hpp | 8 +- apps/openmw/mwgui/windowmanagerimp.hpp | 254 ++++---- apps/openmw/mwinput/bindingsmanager.cpp | 26 +- apps/openmw/mwinput/controllermanager.hpp | 10 +- apps/openmw/mwinput/inputmanagerimp.hpp | 52 +- apps/openmw/mwinput/keyboardmanager.hpp | 6 +- apps/openmw/mwinput/mousemanager.hpp | 8 +- apps/openmw/mwinput/sensormanager.hpp | 4 +- apps/openmw/mwmechanics/actors.cpp | 24 +- apps/openmw/mwmechanics/aicombataction.hpp | 36 +- apps/openmw/mwmechanics/character.hpp | 2 +- .../mwmechanics/mechanicsmanagerimp.hpp | 154 ++--- apps/openmw/mwmechanics/spellabsorption.cpp | 4 +- apps/openmw/mwmechanics/summoning.hpp | 4 +- apps/openmw/mwmechanics/typedaipackage.hpp | 2 +- .../closestnotmeconvexresultcallback.hpp | 2 +- .../closestnotmerayresultcallback.hpp | 2 +- .../mwphysics/contacttestresultcallback.hpp | 4 +- .../deepestnotmecontacttestresultcallback.hpp | 4 +- apps/openmw/mwphysics/physicssystem.hpp | 8 +- apps/openmw/mwrender/actoranimation.hpp | 8 +- apps/openmw/mwrender/animation.cpp | 56 +- apps/openmw/mwrender/animation.hpp | 10 +- apps/openmw/mwrender/bulletdebugdraw.hpp | 12 +- apps/openmw/mwrender/camera.cpp | 2 +- apps/openmw/mwrender/characterpreview.cpp | 6 +- apps/openmw/mwrender/characterpreview.hpp | 6 +- apps/openmw/mwrender/creatureanimation.hpp | 32 +- apps/openmw/mwrender/globalmap.cpp | 4 +- apps/openmw/mwrender/landmanager.hpp | 2 +- apps/openmw/mwrender/localmap.cpp | 2 +- apps/openmw/mwrender/npcanimation.cpp | 8 +- apps/openmw/mwrender/npcanimation.hpp | 44 +- apps/openmw/mwrender/objectpaging.cpp | 18 +- apps/openmw/mwrender/objectpaging.hpp | 2 +- apps/openmw/mwrender/renderingmanager.cpp | 10 +- apps/openmw/mwrender/renderingmanager.hpp | 2 +- apps/openmw/mwrender/rotatecontroller.hpp | 2 +- apps/openmw/mwrender/sky.cpp | 66 +- apps/openmw/mwrender/terrainstorage.hpp | 8 +- apps/openmw/mwrender/util.cpp | 2 +- apps/openmw/mwrender/util.hpp | 2 +- apps/openmw/mwrender/water.cpp | 10 +- apps/openmw/mwrender/weaponanimation.hpp | 2 +- apps/openmw/mwscript/aiextensions.cpp | 38 +- apps/openmw/mwscript/animationextensions.cpp | 6 +- apps/openmw/mwscript/cellextensions.cpp | 20 +- apps/openmw/mwscript/compilercontext.hpp | 12 +- apps/openmw/mwscript/containerextensions.cpp | 16 +- apps/openmw/mwscript/controlextensions.cpp | 22 +- apps/openmw/mwscript/dialogueextensions.cpp | 30 +- apps/openmw/mwscript/guiextensions.cpp | 22 +- apps/openmw/mwscript/interpretercontext.hpp | 72 +-- apps/openmw/mwscript/miscextensions.cpp | 160 ++--- apps/openmw/mwscript/scriptmanagerimp.hpp | 12 +- apps/openmw/mwscript/skyextensions.cpp | 16 +- apps/openmw/mwscript/soundextensions.cpp | 18 +- apps/openmw/mwscript/statsextensions.cpp | 104 ++-- .../mwscript/transformationextensions.cpp | 44 +- apps/openmw/mwscript/userextensions.cpp | 8 +- apps/openmw/mwsound/movieaudiofactory.cpp | 4 +- apps/openmw/mwsound/movieaudiofactory.hpp | 2 +- apps/openmw/mwsound/openal_output.hpp | 54 +- apps/openmw/mwsound/soundmanagerimp.hpp | 68 +- apps/openmw/mwstate/statemanagerimp.hpp | 34 +- apps/openmw/mwworld/actionalchemy.hpp | 2 +- apps/openmw/mwworld/actionapply.hpp | 4 +- apps/openmw/mwworld/actiondoor.hpp | 2 +- apps/openmw/mwworld/actioneat.hpp | 2 +- apps/openmw/mwworld/actionequip.hpp | 2 +- apps/openmw/mwworld/actionharvest.hpp | 2 +- apps/openmw/mwworld/actionopen.hpp | 2 +- apps/openmw/mwworld/actionread.hpp | 2 +- apps/openmw/mwworld/actionrepair.hpp | 2 +- apps/openmw/mwworld/actionsoulgem.hpp | 2 +- apps/openmw/mwworld/actiontake.hpp | 2 +- apps/openmw/mwworld/actiontalk.hpp | 2 +- apps/openmw/mwworld/actionteleport.hpp | 2 +- apps/openmw/mwworld/actiontrap.hpp | 2 +- apps/openmw/mwworld/cellpreloader.cpp | 10 +- apps/openmw/mwworld/cells.cpp | 2 +- apps/openmw/mwworld/esmloader.hpp | 2 +- apps/openmw/mwworld/failedaction.hpp | 2 +- apps/openmw/mwworld/inventorystore.hpp | 18 +- apps/openmw/mwworld/livecellref.hpp | 4 +- apps/openmw/mwworld/nullaction.hpp | 4 +- apps/openmw/mwworld/projectilemanager.cpp | 2 +- apps/openmw/mwworld/scene.cpp | 2 +- apps/openmw/mwworld/store.hpp | 50 +- apps/openmw/mwworld/worldimp.cpp | 6 +- apps/wizard/componentselectionpage.hpp | 6 +- apps/wizard/conclusionpage.hpp | 4 +- apps/wizard/existinginstallationpage.hpp | 8 +- apps/wizard/importpage.hpp | 2 +- apps/wizard/installationpage.hpp | 6 +- apps/wizard/installationtargetpage.hpp | 6 +- apps/wizard/intropage.hpp | 2 +- apps/wizard/languageselectionpage.hpp | 4 +- apps/wizard/mainwizard.hpp | 4 +- apps/wizard/methodselectionpage.hpp | 2 +- components/bsa/compressedbsafile.hpp | 6 +- .../bullethelpers/processtrianglecallback.hpp | 2 +- components/compiler/controlparser.hpp | 10 +- components/compiler/declarationparser.hpp | 10 +- components/compiler/discardparser.hpp | 12 +- components/compiler/exprparser.hpp | 14 +- components/compiler/fileparser.hpp | 12 +- components/compiler/junkparser.hpp | 12 +- components/compiler/lineparser.hpp | 20 +- components/compiler/nullerrorhandler.hpp | 4 +- components/compiler/quickfileparser.hpp | 10 +- components/compiler/scriptparser.hpp | 12 +- components/compiler/skipparser.hpp | 12 +- components/compiler/streamerrorhandler.hpp | 4 +- components/compiler/stringparser.hpp | 10 +- .../contentselector/model/contentmodel.hpp | 22 +- .../contentselector/model/modelitem.hpp | 2 +- components/contentselector/view/combobox.hpp | 2 +- components/debug/debugging.hpp | 2 +- components/debug/gldebug.hpp | 2 +- components/esm/variantimp.hpp | 44 +- components/esmterrain/storage.hpp | 20 +- components/files/constrainedfilestream.cpp | 6 +- components/interpreter/controlopcodes.hpp | 10 +- components/interpreter/genericopcodes.hpp | 14 +- components/interpreter/localopcodes.hpp | 40 +- components/interpreter/mathopcodes.hpp | 12 +- components/interpreter/miscopcodes.hpp | 10 +- components/myguiplatform/myguidatamanager.hpp | 10 +- components/myguiplatform/myguiloglistener.hpp | 8 +- .../myguiplatform/myguirendermanager.cpp | 14 +- .../myguiplatform/myguirendermanager.hpp | 24 +- components/myguiplatform/myguitexture.hpp | 28 +- components/myguiplatform/scalinglayer.cpp | 8 +- components/nif/base.hpp | 12 +- components/nif/controlled.hpp | 24 +- components/nif/controller.hpp | 40 +- components/nif/data.hpp | 38 +- components/nif/effect.hpp | 12 +- components/nif/extra.hpp | 20 +- components/nif/node.hpp | 34 +- components/nif/property.hpp | 22 +- components/nifosg/controller.hpp | 30 +- components/nifosg/nifloader.cpp | 2 +- components/nifosg/particle.hpp | 34 +- components/resource/bulletshapemanager.cpp | 2 +- components/resource/bulletshapemanager.hpp | 6 +- components/resource/imagemanager.hpp | 2 +- components/resource/keyframemanager.hpp | 2 +- components/resource/niffilemanager.hpp | 2 +- components/resource/resourcemanager.hpp | 10 +- components/resource/scenemanager.cpp | 14 +- components/resource/stats.cpp | 2 +- components/resource/stats.hpp | 4 +- components/sceneutil/attach.cpp | 8 +- components/sceneutil/clone.hpp | 4 +- components/sceneutil/controller.hpp | 12 +- components/sceneutil/lightcontroller.hpp | 2 +- components/sceneutil/lightmanager.cpp | 32 +- components/sceneutil/lightmanager.hpp | 2 +- components/sceneutil/morphgeometry.hpp | 10 +- components/sceneutil/mwshadowtechnique.cpp | 4 +- components/sceneutil/mwshadowtechnique.hpp | 24 +- components/sceneutil/optimizer.cpp | 66 +- components/sceneutil/optimizer.hpp | 30 +- .../sceneutil/positionattitudetransform.hpp | 9 +- components/sceneutil/riggeometry.hpp | 12 +- components/sceneutil/skeleton.cpp | 2 +- components/sceneutil/skeleton.hpp | 6 +- components/sceneutil/statesetupdater.hpp | 6 +- components/sceneutil/unrefqueue.hpp | 2 +- components/sceneutil/util.cpp | 2 +- components/sceneutil/util.hpp | 4 +- components/sceneutil/visitor.hpp | 28 +- components/sceneutil/waterutil.cpp | 2 +- components/sdlutil/sdlgraphicswindow.hpp | 36 +- components/shader/shadervisitor.hpp | 6 +- components/terrain/chunkmanager.hpp | 2 +- components/terrain/compositemaprenderer.hpp | 2 +- components/terrain/quadtreenode.hpp | 2 +- components/terrain/quadtreeworld.cpp | 4 +- components/terrain/terraindrawable.hpp | 14 +- components/terrain/terraingrid.cpp | 2 +- components/terrain/terraingrid.hpp | 8 +- components/terrain/texturemanager.hpp | 2 +- components/terrain/viewdata.hpp | 2 +- components/terrain/world.hpp | 2 +- components/vfs/bsaarchive.hpp | 4 +- components/vfs/filesystemarchive.hpp | 4 +- components/widgets/fontwrapper.hpp | 4 +- extern/oics/tinyxml.h | 106 ++-- extern/osgQt/GraphicsWindowQt | 52 +- extern/osgQt/GraphicsWindowQt.cpp | 10 +- .../DebugUtils/Include/DebugDraw.h | 10 +- .../Detour/Source/DetourNavMeshQuery.cpp | 4 +- 441 files changed, 3664 insertions(+), 3676 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fecb589eb1..29600550f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -431,6 +431,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter") endif() + + if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override") + endif() elseif (MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE") endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) diff --git a/apps/launcher/maindialog.hpp b/apps/launcher/maindialog.hpp index d87a43100a..214d31dd4a 100644 --- a/apps/launcher/maindialog.hpp +++ b/apps/launcher/maindialog.hpp @@ -84,7 +84,7 @@ namespace Launcher inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); } bool startProgram(const QString &name, const QStringList &arguments, bool detached = false); - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) override; PlayPage *mPlayPage; GraphicsPage *mGraphicsPage; diff --git a/apps/launcher/utils/lineedit.hpp b/apps/launcher/utils/lineedit.hpp index 2dd7da32bd..50da730459 100644 --- a/apps/launcher/utils/lineedit.hpp +++ b/apps/launcher/utils/lineedit.hpp @@ -27,7 +27,7 @@ public: LineEdit(QWidget *parent = 0); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(QResizeEvent *) override; private slots: void updateClearButton(const QString &text); diff --git a/apps/launcher/utils/textinputdialog.hpp b/apps/launcher/utils/textinputdialog.hpp index 9eb9c717dd..a9353956a0 100644 --- a/apps/launcher/utils/textinputdialog.hpp +++ b/apps/launcher/utils/textinputdialog.hpp @@ -21,7 +21,7 @@ namespace Launcher inline LineEdit *lineEdit() { return mLineEdit; } void setOkButtonEnabled(bool enabled); - int exec(); + int exec() override; private: diff --git a/apps/opencs/main.cpp b/apps/opencs/main.cpp index 0473291cea..d1d4944cf2 100644 --- a/apps/opencs/main.cpp +++ b/apps/opencs/main.cpp @@ -22,7 +22,7 @@ class Application : public QApplication { private: - bool notify (QObject *receiver, QEvent *event) + bool notify (QObject *receiver, QEvent *event) override { try { diff --git a/apps/opencs/model/doc/savingstages.hpp b/apps/opencs/model/doc/savingstages.hpp index 64afd0dd8e..d3a0cc9b31 100644 --- a/apps/opencs/model/doc/savingstages.hpp +++ b/apps/opencs/model/doc/savingstages.hpp @@ -37,10 +37,10 @@ namespace CSMDoc OpenSaveStage (Document& document, SavingState& state, bool projectFile); ///< \param projectFile Saving the project file instead of the content file. - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -55,10 +55,10 @@ namespace CSMDoc WriteHeaderStage (Document& document, SavingState& state, bool simple); ///< \param simple Simplified header (used for project files). - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -75,10 +75,10 @@ namespace CSMDoc WriteCollectionStage (const CollectionT& collection, SavingState& state, CSMWorld::Scope scope = CSMWorld::Scope_Content); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -125,10 +125,10 @@ namespace CSMDoc WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -142,10 +142,10 @@ namespace CSMDoc WriteRefIdCollectionStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -159,10 +159,10 @@ namespace CSMDoc CollectionReferencesStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -175,10 +175,10 @@ namespace CSMDoc WriteCellCollectionStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -192,10 +192,10 @@ namespace CSMDoc WritePathgridCollectionStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -209,10 +209,10 @@ namespace CSMDoc WriteLandCollectionStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -226,10 +226,10 @@ namespace CSMDoc WriteLandTextureCollectionStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -241,10 +241,10 @@ namespace CSMDoc CloseSaveStage (SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -257,10 +257,10 @@ namespace CSMDoc FinalSavingStage (Document& document, SavingState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, Messages& messages); + void perform (int stage, Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; } diff --git a/apps/opencs/model/filter/andnode.hpp b/apps/opencs/model/filter/andnode.hpp index 56d1d79484..ab2c3ea992 100644 --- a/apps/opencs/model/filter/andnode.hpp +++ b/apps/opencs/model/filter/andnode.hpp @@ -11,8 +11,8 @@ namespace CSMFilter AndNode (const std::vector >& nodes); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping }; diff --git a/apps/opencs/model/filter/booleannode.hpp b/apps/opencs/model/filter/booleannode.hpp index 32206b5753..bed6cbeb0c 100644 --- a/apps/opencs/model/filter/booleannode.hpp +++ b/apps/opencs/model/filter/booleannode.hpp @@ -13,12 +13,12 @@ namespace CSMFilter BooleanNode (bool true_); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping - virtual std::string toString (bool numericColumns) const; + std::string toString (bool numericColumns) const override; ///< Return a string that represents this node. /// /// \param numericColumns Use numeric IDs instead of string to represent columns. diff --git a/apps/opencs/model/filter/leafnode.hpp b/apps/opencs/model/filter/leafnode.hpp index 2f3d910708..d27bdcfe84 100644 --- a/apps/opencs/model/filter/leafnode.hpp +++ b/apps/opencs/model/filter/leafnode.hpp @@ -11,7 +11,7 @@ namespace CSMFilter { public: - virtual std::vector getReferencedColumns() const; + std::vector getReferencedColumns() const override; ///< Return a list of the IDs of the columns referenced by this node. The column mapping /// passed into test as columns must contain all columns listed here. }; diff --git a/apps/opencs/model/filter/narynode.hpp b/apps/opencs/model/filter/narynode.hpp index 1cd93e62ea..231e38e13e 100644 --- a/apps/opencs/model/filter/narynode.hpp +++ b/apps/opencs/model/filter/narynode.hpp @@ -21,11 +21,11 @@ namespace CSMFilter const Node& operator[] (int index) const; - virtual std::vector getReferencedColumns() const; + std::vector getReferencedColumns() const override; ///< Return a list of the IDs of the columns referenced by this node. The column mapping /// passed into test as columns must contain all columns listed here. - virtual std::string toString (bool numericColumns) const; + std::string toString (bool numericColumns) const override; ///< Return a string that represents this node. /// /// \param numericColumns Use numeric IDs instead of string to represent columns. diff --git a/apps/opencs/model/filter/notnode.hpp b/apps/opencs/model/filter/notnode.hpp index e3c57cede4..5b15163d97 100644 --- a/apps/opencs/model/filter/notnode.hpp +++ b/apps/opencs/model/filter/notnode.hpp @@ -11,8 +11,8 @@ namespace CSMFilter NotNode (std::shared_ptr child); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping }; diff --git a/apps/opencs/model/filter/ornode.hpp b/apps/opencs/model/filter/ornode.hpp index b89da4e753..61115b3d9d 100644 --- a/apps/opencs/model/filter/ornode.hpp +++ b/apps/opencs/model/filter/ornode.hpp @@ -11,8 +11,8 @@ namespace CSMFilter OrNode (const std::vector >& nodes); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping }; diff --git a/apps/opencs/model/filter/textnode.hpp b/apps/opencs/model/filter/textnode.hpp index 60ead85def..0e7a0e4f5e 100644 --- a/apps/opencs/model/filter/textnode.hpp +++ b/apps/opencs/model/filter/textnode.hpp @@ -14,16 +14,16 @@ namespace CSMFilter TextNode (int columnId, const std::string& text); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping - virtual std::vector getReferencedColumns() const; + std::vector getReferencedColumns() const override; ///< Return a list of the IDs of the columns referenced by this node. The column mapping /// passed into test as columns must contain all columns listed here. - virtual std::string toString (bool numericColumns) const; + std::string toString (bool numericColumns) const override; ///< Return a string that represents this node. /// /// \param numericColumns Use numeric IDs instead of string to represent columns. diff --git a/apps/opencs/model/filter/unarynode.hpp b/apps/opencs/model/filter/unarynode.hpp index cbee4e0bae..39326d1672 100644 --- a/apps/opencs/model/filter/unarynode.hpp +++ b/apps/opencs/model/filter/unarynode.hpp @@ -18,11 +18,11 @@ namespace CSMFilter Node& getChild(); - virtual std::vector getReferencedColumns() const; + std::vector getReferencedColumns() const override; ///< Return a list of the IDs of the columns referenced by this node. The column mapping /// passed into test as columns must contain all columns listed here. - virtual std::string toString (bool numericColumns) const; + std::string toString (bool numericColumns) const override; ///< Return a string that represents this node. /// /// \param numericColumns Use numeric IDs instead of string to represent columns. diff --git a/apps/opencs/model/filter/valuenode.hpp b/apps/opencs/model/filter/valuenode.hpp index 5b7ffec4ef..339e4948a6 100644 --- a/apps/opencs/model/filter/valuenode.hpp +++ b/apps/opencs/model/filter/valuenode.hpp @@ -27,16 +27,16 @@ namespace CSMFilter ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper); - virtual bool test (const CSMWorld::IdTableBase& table, int row, - const std::map& columns) const; + bool test (const CSMWorld::IdTableBase& table, int row, + const std::map& columns) const override; ///< \return Can the specified table row pass through to filter? /// \param columns column ID to column index mapping - virtual std::vector getReferencedColumns() const; + std::vector getReferencedColumns() const override; ///< Return a list of the IDs of the columns referenced by this node. The column mapping /// passed into test as columns must contain all columns listed here. - virtual std::string toString (bool numericColumns) const; + std::string toString (bool numericColumns) const override; ///< Return a string that represents this node. /// /// \param numericColumns Use numeric IDs instead of string to represent columns. diff --git a/apps/opencs/model/prefs/boolsetting.hpp b/apps/opencs/model/prefs/boolsetting.hpp index 37c018d140..941cb50372 100644 --- a/apps/opencs/model/prefs/boolsetting.hpp +++ b/apps/opencs/model/prefs/boolsetting.hpp @@ -23,9 +23,9 @@ namespace CSMPrefs BoolSetting& setTooltip (const std::string& tooltip); /// Return label, input widget. - virtual std::pair makeWidgets (QWidget *parent); + std::pair makeWidgets (QWidget *parent) override; - virtual void updateWidget(); + void updateWidget() override; private slots: diff --git a/apps/opencs/model/prefs/coloursetting.hpp b/apps/opencs/model/prefs/coloursetting.hpp index e892b21d65..4a814c0e2e 100644 --- a/apps/opencs/model/prefs/coloursetting.hpp +++ b/apps/opencs/model/prefs/coloursetting.hpp @@ -29,9 +29,9 @@ namespace CSMPrefs ColourSetting& setTooltip (const std::string& tooltip); /// Return label, input widget. - virtual std::pair makeWidgets (QWidget *parent); + std::pair makeWidgets (QWidget *parent) override; - virtual void updateWidget(); + void updateWidget() override; private slots: diff --git a/apps/opencs/model/prefs/doublesetting.hpp b/apps/opencs/model/prefs/doublesetting.hpp index 4d297409b5..47886e446f 100644 --- a/apps/opencs/model/prefs/doublesetting.hpp +++ b/apps/opencs/model/prefs/doublesetting.hpp @@ -36,9 +36,9 @@ namespace CSMPrefs DoubleSetting& setTooltip (const std::string& tooltip); /// Return label, input widget. - virtual std::pair makeWidgets (QWidget *parent); + std::pair makeWidgets (QWidget *parent) override; - virtual void updateWidget(); + void updateWidget() override; private slots: diff --git a/apps/opencs/model/prefs/enumsetting.hpp b/apps/opencs/model/prefs/enumsetting.hpp index b01635cdf1..235f6adc3a 100644 --- a/apps/opencs/model/prefs/enumsetting.hpp +++ b/apps/opencs/model/prefs/enumsetting.hpp @@ -54,9 +54,9 @@ namespace CSMPrefs EnumSetting& addValue (const std::string& value, const std::string& tooltip); /// Return label, input widget. - virtual std::pair makeWidgets (QWidget *parent); + std::pair makeWidgets (QWidget *parent) override; - virtual void updateWidget(); + void updateWidget() override; private slots: diff --git a/apps/opencs/model/prefs/intsetting.hpp b/apps/opencs/model/prefs/intsetting.hpp index ee0989d835..f18213b77b 100644 --- a/apps/opencs/model/prefs/intsetting.hpp +++ b/apps/opencs/model/prefs/intsetting.hpp @@ -32,9 +32,9 @@ namespace CSMPrefs IntSetting& setTooltip (const std::string& tooltip); /// Return label, input widget. - virtual std::pair makeWidgets (QWidget *parent); + std::pair makeWidgets (QWidget *parent) override; - virtual void updateWidget(); + void updateWidget() override; private slots: diff --git a/apps/opencs/model/prefs/modifiersetting.hpp b/apps/opencs/model/prefs/modifiersetting.hpp index 2c6a45b5a3..977badb8df 100644 --- a/apps/opencs/model/prefs/modifiersetting.hpp +++ b/apps/opencs/model/prefs/modifiersetting.hpp @@ -19,13 +19,13 @@ namespace CSMPrefs ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key, const std::string& label); - virtual std::pair makeWidgets(QWidget* parent); + std::pair makeWidgets(QWidget* parent) override; - virtual void updateWidget(); + void updateWidget() override; protected: - bool eventFilter(QObject* target, QEvent* event); + bool eventFilter(QObject* target, QEvent* event) override; private: diff --git a/apps/opencs/model/prefs/shortcuteventhandler.hpp b/apps/opencs/model/prefs/shortcuteventhandler.hpp index 6a7ba25228..700b977fd3 100644 --- a/apps/opencs/model/prefs/shortcuteventhandler.hpp +++ b/apps/opencs/model/prefs/shortcuteventhandler.hpp @@ -27,7 +27,7 @@ namespace CSMPrefs protected: - bool eventFilter(QObject* watched, QEvent* event); + bool eventFilter(QObject* watched, QEvent* event) override; private: diff --git a/apps/opencs/model/prefs/shortcutsetting.hpp b/apps/opencs/model/prefs/shortcutsetting.hpp index c388305a66..a0c588b42e 100644 --- a/apps/opencs/model/prefs/shortcutsetting.hpp +++ b/apps/opencs/model/prefs/shortcutsetting.hpp @@ -19,13 +19,13 @@ namespace CSMPrefs ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key, const std::string& label); - virtual std::pair makeWidgets(QWidget* parent); + std::pair makeWidgets(QWidget* parent) override; - virtual void updateWidget(); + void updateWidget() override; protected: - bool eventFilter(QObject* target, QEvent* event); + bool eventFilter(QObject* target, QEvent* event) override; private: diff --git a/apps/opencs/model/tools/birthsigncheck.hpp b/apps/opencs/model/tools/birthsigncheck.hpp index 9001c524cd..498894f882 100644 --- a/apps/opencs/model/tools/birthsigncheck.hpp +++ b/apps/opencs/model/tools/birthsigncheck.hpp @@ -22,10 +22,10 @@ namespace CSMTools BirthsignCheckStage (const CSMWorld::IdCollection &birthsigns, const CSMWorld::Resources &textures); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/bodypartcheck.hpp b/apps/opencs/model/tools/bodypartcheck.hpp index 5c8ae2929c..2c379bd078 100644 --- a/apps/opencs/model/tools/bodypartcheck.hpp +++ b/apps/opencs/model/tools/bodypartcheck.hpp @@ -25,10 +25,10 @@ namespace CSMTools const CSMWorld::Resources &meshes, const CSMWorld::IdCollection &races ); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform( int stage, CSMDoc::Messages &messages ); + void perform(int stage, CSMDoc::Messages &messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/classcheck.hpp b/apps/opencs/model/tools/classcheck.hpp index ba0a07047a..a78c2eb975 100644 --- a/apps/opencs/model/tools/classcheck.hpp +++ b/apps/opencs/model/tools/classcheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools ClassCheckStage (const CSMWorld::IdCollection& classes); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/enchantmentcheck.hpp b/apps/opencs/model/tools/enchantmentcheck.hpp index 3bd85326fb..e9c8b9eece 100644 --- a/apps/opencs/model/tools/enchantmentcheck.hpp +++ b/apps/opencs/model/tools/enchantmentcheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools EnchantmentCheckStage (const CSMWorld::IdCollection& enchantments); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; diff --git a/apps/opencs/model/tools/factioncheck.hpp b/apps/opencs/model/tools/factioncheck.hpp index b26d19717a..d281c1b416 100644 --- a/apps/opencs/model/tools/factioncheck.hpp +++ b/apps/opencs/model/tools/factioncheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools FactionCheckStage (const CSMWorld::IdCollection& factions); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/gmstcheck.hpp b/apps/opencs/model/tools/gmstcheck.hpp index 27bd61317c..2c12a8607a 100644 --- a/apps/opencs/model/tools/gmstcheck.hpp +++ b/apps/opencs/model/tools/gmstcheck.hpp @@ -16,10 +16,10 @@ namespace CSMTools GmstCheckStage(const CSMWorld::IdCollection& gameSettings); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform(int stage, CSMDoc::Messages& messages); + void perform(int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages private: diff --git a/apps/opencs/model/tools/journalcheck.hpp b/apps/opencs/model/tools/journalcheck.hpp index 661edcaef9..b63127b522 100644 --- a/apps/opencs/model/tools/journalcheck.hpp +++ b/apps/opencs/model/tools/journalcheck.hpp @@ -18,10 +18,10 @@ namespace CSMTools JournalCheckStage(const CSMWorld::IdCollection& journals, const CSMWorld::InfoCollection& journalInfos); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform(int stage, CSMDoc::Messages& messages); + void perform(int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages private: diff --git a/apps/opencs/model/tools/magiceffectcheck.hpp b/apps/opencs/model/tools/magiceffectcheck.hpp index a52723b0fe..4b2c24cc7c 100644 --- a/apps/opencs/model/tools/magiceffectcheck.hpp +++ b/apps/opencs/model/tools/magiceffectcheck.hpp @@ -32,9 +32,9 @@ namespace CSMTools const CSMWorld::Resources &icons, const CSMWorld::Resources &textures); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages &messages); + void perform (int stage, CSMDoc::Messages &messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/mandatoryid.hpp b/apps/opencs/model/tools/mandatoryid.hpp index 86015c9824..9d069a2da8 100644 --- a/apps/opencs/model/tools/mandatoryid.hpp +++ b/apps/opencs/model/tools/mandatoryid.hpp @@ -27,10 +27,10 @@ namespace CSMTools MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId, const std::vector& ids); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/mergeoperation.hpp b/apps/opencs/model/tools/mergeoperation.hpp index 733fc8ebac..427967190c 100644 --- a/apps/opencs/model/tools/mergeoperation.hpp +++ b/apps/opencs/model/tools/mergeoperation.hpp @@ -31,7 +31,7 @@ namespace CSMTools protected slots: - virtual void operationDone(); + void operationDone() override; signals: diff --git a/apps/opencs/model/tools/mergestages.hpp b/apps/opencs/model/tools/mergestages.hpp index 4b41c5a04f..bcb3fe2ad2 100644 --- a/apps/opencs/model/tools/mergestages.hpp +++ b/apps/opencs/model/tools/mergestages.hpp @@ -22,10 +22,10 @@ namespace CSMTools StartMergeStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -38,10 +38,10 @@ namespace CSMTools FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -55,10 +55,10 @@ namespace CSMTools MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)()); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -93,10 +93,10 @@ namespace CSMTools MergeRefIdsStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -109,10 +109,10 @@ namespace CSMTools MergeReferencesStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -125,10 +125,10 @@ namespace CSMTools PopulateLandTexturesMergeStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -140,10 +140,10 @@ namespace CSMTools MergeLandStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -157,10 +157,10 @@ namespace CSMTools FixLandsAndLandTexturesMergeStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; @@ -174,10 +174,10 @@ namespace CSMTools CleanupLandTexturesMergeStage (MergeState& state); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/pathgridcheck.hpp b/apps/opencs/model/tools/pathgridcheck.hpp index 3e2fdd0aba..212637fd42 100644 --- a/apps/opencs/model/tools/pathgridcheck.hpp +++ b/apps/opencs/model/tools/pathgridcheck.hpp @@ -32,9 +32,9 @@ namespace CSMTools PathgridCheckStage (const CSMWorld::SubCellCollection >& pathgrids); - virtual int setup(); + int setup() override; - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; }; } diff --git a/apps/opencs/model/tools/racecheck.hpp b/apps/opencs/model/tools/racecheck.hpp index 55c2836119..7c70f13b00 100644 --- a/apps/opencs/model/tools/racecheck.hpp +++ b/apps/opencs/model/tools/racecheck.hpp @@ -24,10 +24,10 @@ namespace CSMTools RaceCheckStage (const CSMWorld::IdCollection& races); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/referenceablecheck.hpp b/apps/opencs/model/tools/referenceablecheck.hpp index e55e5fad97..83c8f12325 100644 --- a/apps/opencs/model/tools/referenceablecheck.hpp +++ b/apps/opencs/model/tools/referenceablecheck.hpp @@ -22,8 +22,8 @@ namespace CSMTools const CSMWorld::Resources& icons, const CSMWorld::IdCollection& bodyparts); - virtual void perform(int stage, CSMDoc::Messages& messages); - virtual int setup(); + void perform(int stage, CSMDoc::Messages& messages) override; + int setup() override; private: //CONCRETE CHECKS diff --git a/apps/opencs/model/tools/referencecheck.hpp b/apps/opencs/model/tools/referencecheck.hpp index 7373903e66..2da139869c 100644 --- a/apps/opencs/model/tools/referencecheck.hpp +++ b/apps/opencs/model/tools/referencecheck.hpp @@ -14,8 +14,8 @@ namespace CSMTools const CSMWorld::IdCollection& cells, const CSMWorld::IdCollection& factions); - virtual void perform(int stage, CSMDoc::Messages& messages); - virtual int setup(); + void perform(int stage, CSMDoc::Messages& messages) override; + int setup() override; private: const CSMWorld::RefCollection& mReferences; diff --git a/apps/opencs/model/tools/regioncheck.hpp b/apps/opencs/model/tools/regioncheck.hpp index 4c12727f0a..e7ddb0bcab 100644 --- a/apps/opencs/model/tools/regioncheck.hpp +++ b/apps/opencs/model/tools/regioncheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools RegionCheckStage (const CSMWorld::IdCollection& regions); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/reportmodel.hpp b/apps/opencs/model/tools/reportmodel.hpp index 61b4e63074..809dfcc3e8 100644 --- a/apps/opencs/model/tools/reportmodel.hpp +++ b/apps/opencs/model/tools/reportmodel.hpp @@ -33,15 +33,15 @@ namespace CSMTools ReportModel (bool fieldColumn = false, bool severityColumn = true); - virtual int rowCount (const QModelIndex & parent = QModelIndex()) const; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; - virtual int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; - virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; - virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override; void add (const CSMDoc::Message& message); diff --git a/apps/opencs/model/tools/scriptcheck.hpp b/apps/opencs/model/tools/scriptcheck.hpp index 8f4ac97635..d975e02da5 100644 --- a/apps/opencs/model/tools/scriptcheck.hpp +++ b/apps/opencs/model/tools/scriptcheck.hpp @@ -36,20 +36,20 @@ namespace CSMTools CSMDoc::Message::Severity getSeverity (Type type); - virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type); + void report (const std::string& message, const Compiler::TokenLoc& loc, Type type) override; ///< Report error to the user. - virtual void report (const std::string& message, Type type); + void report (const std::string& message, Type type) override; ///< Report a file related error public: ScriptCheckStage (const CSMDoc::Document& document); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/searchstage.hpp b/apps/opencs/model/tools/searchstage.hpp index 073487c0d2..86abf31a34 100644 --- a/apps/opencs/model/tools/searchstage.hpp +++ b/apps/opencs/model/tools/searchstage.hpp @@ -24,10 +24,10 @@ namespace CSMTools SearchStage (const CSMWorld::IdTableBase *model); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages. void setOperation (const SearchOperation *operation); diff --git a/apps/opencs/model/tools/skillcheck.hpp b/apps/opencs/model/tools/skillcheck.hpp index edd6b79a0d..b1af887f6c 100644 --- a/apps/opencs/model/tools/skillcheck.hpp +++ b/apps/opencs/model/tools/skillcheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools SkillCheckStage (const CSMWorld::IdCollection& skills); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/soundcheck.hpp b/apps/opencs/model/tools/soundcheck.hpp index fc59257178..80eb9e7f29 100644 --- a/apps/opencs/model/tools/soundcheck.hpp +++ b/apps/opencs/model/tools/soundcheck.hpp @@ -22,10 +22,10 @@ namespace CSMTools SoundCheckStage (const CSMWorld::IdCollection& sounds, const CSMWorld::Resources &soundfiles); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/soundgencheck.hpp b/apps/opencs/model/tools/soundgencheck.hpp index 3c2a7f071d..306d35ded9 100644 --- a/apps/opencs/model/tools/soundgencheck.hpp +++ b/apps/opencs/model/tools/soundgencheck.hpp @@ -20,10 +20,10 @@ namespace CSMTools const CSMWorld::IdCollection &sounds, const CSMWorld::RefIdCollection &objects); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform(int stage, CSMDoc::Messages &messages); + void perform(int stage, CSMDoc::Messages &messages) override; ///< Messages resulting from this stage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/spellcheck.hpp b/apps/opencs/model/tools/spellcheck.hpp index 03513adc3c..bfc9628107 100644 --- a/apps/opencs/model/tools/spellcheck.hpp +++ b/apps/opencs/model/tools/spellcheck.hpp @@ -19,10 +19,10 @@ namespace CSMTools SpellCheckStage (const CSMWorld::IdCollection& spells); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform (int stage, CSMDoc::Messages& messages); + void perform (int stage, CSMDoc::Messages& messages) override; ///< Messages resulting from this tage will be appended to \a messages. }; } diff --git a/apps/opencs/model/tools/startscriptcheck.hpp b/apps/opencs/model/tools/startscriptcheck.hpp index a7d70ee5a0..a45d3c9437 100644 --- a/apps/opencs/model/tools/startscriptcheck.hpp +++ b/apps/opencs/model/tools/startscriptcheck.hpp @@ -21,8 +21,8 @@ namespace CSMTools StartScriptCheckStage (const CSMWorld::IdCollection& startScripts, const CSMWorld::IdCollection& scripts); - virtual void perform(int stage, CSMDoc::Messages& messages); - virtual int setup(); + void perform(int stage, CSMDoc::Messages& messages) override; + int setup() override; }; } diff --git a/apps/opencs/model/tools/topicinfocheck.hpp b/apps/opencs/model/tools/topicinfocheck.hpp index 9575181b0a..b9dbdc1536 100644 --- a/apps/opencs/model/tools/topicinfocheck.hpp +++ b/apps/opencs/model/tools/topicinfocheck.hpp @@ -40,10 +40,10 @@ namespace CSMTools const CSMWorld::RefIdData& referencables, const CSMWorld::Resources& soundFiles); - virtual int setup(); + int setup() override; ///< \return number of steps - virtual void perform(int step, CSMDoc::Messages& messages); + void perform(int step, CSMDoc::Messages& messages) override; ///< Messages resulting from this stage will be appended to \a messages private: diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp index 3d6802b869..451ef9d0e1 100644 --- a/apps/opencs/model/world/collection.hpp +++ b/apps/opencs/model/world/collection.hpp @@ -120,19 +120,19 @@ namespace CSMWorld void add (const ESXRecordT& record); ///< Add a new record (modified) - virtual int getSize() const; + int getSize() const override; - virtual std::string getId (int index) const; + std::string getId (int index) const override; - virtual int getIndex (const std::string& id) const; + int getIndex (const std::string& id) const override; - virtual int getColumns() const; + int getColumns() const override; - virtual QVariant getData (int index, int column) const; + QVariant getData (int index, int column) const override; - virtual void setData (int index, int column, const QVariant& data); + void setData (int index, int column, const QVariant& data) override; - virtual const ColumnBase& getColumn (int column) const; + const ColumnBase& getColumn (int column) const override; virtual void merge(); ///< Merge modified into base. @@ -140,43 +140,43 @@ namespace CSMWorld virtual void purge(); ///< Remove records that are flagged as erased. - virtual void removeRows (int index, int count) ; + void removeRows (int index, int count) override; - virtual void appendBlankRecord (const std::string& id, - UniversalId::Type type = UniversalId::Type_None); + void appendBlankRecord (const std::string& id, + UniversalId::Type type = UniversalId::Type_None) override; ///< \param type Will be ignored, unless the collection supports multiple record types - virtual void cloneRecord(const std::string& origin, + void cloneRecord(const std::string& origin, const std::string& destination, - const UniversalId::Type type); + const UniversalId::Type type) override; - virtual bool touchRecord(const std::string& id); + bool touchRecord(const std::string& id) override; ///< Change the state of a record from base to modified, if it is not already. /// \return True if the record was changed. - virtual int searchId (const std::string& id) const; + int searchId (const std::string& id) const override; ////< Search record with \a id. /// \return index of record (if found) or -1 (not found) - virtual void replace (int index, const RecordBase& record); + void replace (int index, const RecordBase& record) override; ///< If the record type does not match, an exception is thrown. /// /// \attention \a record must not change the ID. - virtual void appendRecord (const RecordBase& record, - UniversalId::Type type = UniversalId::Type_None); + void appendRecord (const RecordBase& record, + UniversalId::Type type = UniversalId::Type_None) override; ///< If the record type does not match, an exception is thrown. ///< \param type Will be ignored, unless the collection supports multiple record types - virtual const Record& getRecord (const std::string& id) const; + const Record& getRecord (const std::string& id) const override; - virtual const Record& getRecord (int index) const; + const Record& getRecord (int index) const override; - virtual int getAppendIndex (const std::string& id, - UniversalId::Type type = UniversalId::Type_None) const; + int getAppendIndex (const std::string& id, + UniversalId::Type type = UniversalId::Type_None) const override; ///< \param type Will be ignored, unless the collection supports multiple record types - virtual std::vector getIds (bool listDeleted = true) const; + std::vector getIds (bool listDeleted = true) const override; ///< Return a sorted collection of all IDs /// /// \param listDeleted include deleted record in the list @@ -190,7 +190,7 @@ namespace CSMWorld /// If the index is invalid either generally (by being out of range) or for the particular /// record, an exception is thrown. - virtual bool reorderRows (int baseIndex, const std::vector& newOrder); + bool reorderRows (int baseIndex, const std::vector& newOrder) override; ///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices /// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex). /// diff --git a/apps/opencs/model/world/columnbase.hpp b/apps/opencs/model/world/columnbase.hpp index d4f78854d7..6dc58bd634 100644 --- a/apps/opencs/model/world/columnbase.hpp +++ b/apps/opencs/model/world/columnbase.hpp @@ -211,13 +211,13 @@ namespace CSMWorld : Column (id, ColumnBase::Display_NestedHeader, flags), mFixedRows(fixedRows) {} - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { // There is nothing to do here. // This prevents exceptions from parent's implementation } - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { // by default editable; also see IdTree::hasChildren() if (mFixedRows) @@ -226,7 +226,7 @@ namespace CSMWorld return QVariant::fromValue(ColumnBase::TableEdit_Full); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -240,7 +240,7 @@ namespace CSMWorld NestedChildColumn (int id, Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true); - virtual bool isEditable() const; + bool isEditable() const override; private: bool mIsEditable; diff --git a/apps/opencs/model/world/columnimp.hpp b/apps/opencs/model/world/columnimp.hpp index ccc18263b0..c69ca1d842 100644 --- a/apps/opencs/model/world/columnimp.hpp +++ b/apps/opencs/model/world/columnimp.hpp @@ -28,19 +28,19 @@ namespace CSMWorld { FloatValueColumn() : Column (Columns::ColumnId_Value, ColumnBase::Display_Float) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mValue.getFloat(); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mValue.setFloat (data.toFloat()); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -54,12 +54,12 @@ namespace CSMWorld hidden ? 0 : ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mId.c_str()); } - virtual bool isEditable() const + bool isEditable() const override { return false; } @@ -86,7 +86,7 @@ namespace CSMWorld : Column (Columns::ColumnId_Modification, ColumnBase::Display_RecordState) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { if (record.mState==Record::State_Erased) return static_cast (Record::State_Deleted); @@ -94,17 +94,17 @@ namespace CSMWorld return static_cast (record.mState); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { record.mState = static_cast (data.toInt()); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -120,12 +120,12 @@ namespace CSMWorld mType (type) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return mType; } - virtual bool isEditable() const + bool isEditable() const override { return false; } @@ -139,19 +139,19 @@ namespace CSMWorld : Column (Columns::ColumnId_ValueType, display, ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mValue.getType()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mValue.setType (static_cast (data.toInt())); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -163,7 +163,7 @@ namespace CSMWorld { VarValueColumn() : Column (Columns::ColumnId_Value, ColumnBase::Display_Var, ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { switch (record.get().mValue.getType()) { @@ -185,7 +185,7 @@ namespace CSMWorld } } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -214,7 +214,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -227,12 +227,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Description, ColumnBase::Display_LongString) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mDescription.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -241,7 +241,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -254,12 +254,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Specialisation, ColumnBase::Display_Specialisation) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mSpecialization; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -268,7 +268,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -284,12 +284,12 @@ namespace CSMWorld mIndex (index) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mUseValue[mIndex]; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -298,7 +298,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -311,12 +311,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mAttribute; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -325,7 +325,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -336,12 +336,12 @@ namespace CSMWorld { NameColumn() : Column (Columns::ColumnId_Name, ColumnBase::Display_String) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mName.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -350,7 +350,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -366,12 +366,12 @@ namespace CSMWorld mIndex (index) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mAttribute[mIndex]; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -380,7 +380,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -399,14 +399,14 @@ namespace CSMWorld mIndex (index), mMajor (major) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { int skill = record.get().mData.getSkill (mIndex, mMajor); return QString::fromUtf8 (ESM::Skill::indexToId (skill).c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { std::istringstream stream (data.toString().toUtf8().constData()); @@ -425,7 +425,7 @@ namespace CSMWorld } } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -437,12 +437,12 @@ namespace CSMWorld PlayableColumn() : Column (Columns::ColumnId_Playable, ColumnBase::Display_Boolean) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mIsPlayable!=0; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -451,7 +451,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -462,12 +462,12 @@ namespace CSMWorld { HiddenColumn() : Column (Columns::ColumnId_Hidden, ColumnBase::Display_Boolean) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mIsHidden!=0; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -476,7 +476,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -494,7 +494,7 @@ namespace CSMWorld mInverted (inverted) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { bool flag = (record.get().mData.mFlags & mMask)!=0; @@ -504,7 +504,7 @@ namespace CSMWorld return flag; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -518,7 +518,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -535,7 +535,7 @@ namespace CSMWorld mInverted (inverted) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { bool flag = (record.get().mFlags & mMask)!=0; @@ -545,7 +545,7 @@ namespace CSMWorld return flag; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -559,7 +559,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -579,7 +579,7 @@ namespace CSMWorld mMale (male), mWeight (weight) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { const ESM::Race::MaleFemaleF& value = mWeight ? record.get().mData.mWeight : record.get().mData.mHeight; @@ -587,7 +587,7 @@ namespace CSMWorld return mMale ? value.mMale : value.mFemale; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -599,7 +599,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -624,7 +624,7 @@ namespace CSMWorld mType (type) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { int value = 0; @@ -638,7 +638,7 @@ namespace CSMWorld return value; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { int value = data.toInt(); @@ -659,7 +659,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -672,12 +672,12 @@ namespace CSMWorld : Column (Columns::ColumnId_SoundFile, ColumnBase::Display_SoundRes) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mSound.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -686,7 +686,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -699,19 +699,19 @@ namespace CSMWorld : Column (Columns::ColumnId_MapColour, ColumnBase::Display_Colour) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mMapColor; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT copy = record.get(); copy.mMapColor = data.toInt(); record.setModified (copy); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -724,12 +724,12 @@ namespace CSMWorld : Column (Columns::ColumnId_SleepEncounter, ColumnBase::Display_CreatureLevelledList) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mSleepList.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -738,7 +738,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -749,12 +749,12 @@ namespace CSMWorld { TextureColumn() : Column (Columns::ColumnId_Texture, ColumnBase::Display_Texture) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mTexture.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -763,7 +763,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -776,12 +776,12 @@ namespace CSMWorld : Column (Columns::ColumnId_SpellType, ColumnBase::Display_SpellType) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mType; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -790,7 +790,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -801,19 +801,19 @@ namespace CSMWorld { CostColumn() : Column (Columns::ColumnId_Cost, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mCost; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mCost = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -835,12 +835,12 @@ namespace CSMWorld type==Type_File ? 0 : ColumnBase::Flag_Dialogue) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mScriptText.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -849,7 +849,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -860,12 +860,12 @@ namespace CSMWorld { RegionColumn() : Column (Columns::ColumnId_Region, ColumnBase::Display_Region) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mRegion.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -874,7 +874,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -891,12 +891,12 @@ namespace CSMWorld mBlocked (blocked) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mCell.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -905,12 +905,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return !mBlocked; } @@ -923,12 +923,12 @@ namespace CSMWorld : Column (Columns::ColumnId_OriginalCell, ColumnBase::Display_Cell) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mOriginalCell.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -937,12 +937,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -954,12 +954,12 @@ namespace CSMWorld IdColumn() : Column (Columns::ColumnId_ReferenceableId, ColumnBase::Display_Referenceable) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mRefID.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -968,7 +968,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -979,19 +979,19 @@ namespace CSMWorld { ScaleColumn() : Column (Columns::ColumnId_Scale, ColumnBase::Display_Float) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mScale; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mScale = data.toFloat(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1002,12 +1002,12 @@ namespace CSMWorld { OwnerColumn() : Column (Columns::ColumnId_Owner, ColumnBase::Display_Npc) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mOwner.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1016,7 +1016,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1027,12 +1027,12 @@ namespace CSMWorld { SoulColumn() : Column (Columns::ColumnId_Soul, ColumnBase::Display_Creature) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mSoul.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1041,7 +1041,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1052,12 +1052,12 @@ namespace CSMWorld { FactionColumn() : Column (Columns::ColumnId_Faction, ColumnBase::Display_Faction) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mFaction.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1066,7 +1066,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1079,19 +1079,19 @@ namespace CSMWorld : Column (Columns::ColumnId_FactionIndex, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mFactionRank; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mFactionRank = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1102,19 +1102,19 @@ namespace CSMWorld { ChargesColumn() : Column (Columns::ColumnId_Charges, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mChargeInt; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mChargeInt = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1127,19 +1127,19 @@ namespace CSMWorld : Column (Columns::ColumnId_Enchantment, ColumnBase::Display_Float) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mEnchantmentCharge; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mEnchantmentCharge = data.toFloat(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1151,19 +1151,19 @@ namespace CSMWorld GoldValueColumn() : Column (Columns::ColumnId_CoinValue, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mGoldValue; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mGoldValue = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1176,12 +1176,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Teleport, ColumnBase::Display_Boolean) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mTeleport; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1190,7 +1190,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1203,12 +1203,12 @@ namespace CSMWorld : Column (Columns::ColumnId_TeleportCell, ColumnBase::Display_Cell) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mDestCell.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1217,12 +1217,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return true; } @@ -1235,19 +1235,19 @@ namespace CSMWorld : Column (Columns::ColumnId_LockLevel, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mLockLevel; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mLockLevel = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1258,12 +1258,12 @@ namespace CSMWorld { KeyColumn() : Column (Columns::ColumnId_Key, ColumnBase::Display_Miscellaneous) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mKey.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1272,7 +1272,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1283,12 +1283,12 @@ namespace CSMWorld { TrapColumn() : Column (Columns::ColumnId_Trap, ColumnBase::Display_Spell) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mTrap.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1297,7 +1297,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1308,12 +1308,12 @@ namespace CSMWorld { FilterColumn() : Column (Columns::ColumnId_Filter, ColumnBase::Display_Filter) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mFilter.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1322,7 +1322,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1339,13 +1339,13 @@ namespace CSMWorld (door ? Columns::ColumnId_DoorPositionXPos : Columns::ColumnId_PositionXPos)+index, ColumnBase::Display_Float), mPosition (position), mIndex (index) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { const ESM::Position& position = record.get().*mPosition; return position.pos[mIndex]; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1356,7 +1356,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1373,13 +1373,13 @@ namespace CSMWorld (door ? Columns::ColumnId_DoorPositionXRot : Columns::ColumnId_PositionXRot)+index, ColumnBase::Display_Double), mPosition (position), mIndex (index) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { const ESM::Position& position = record.get().*mPosition; return osg::RadiansToDegrees(position.rot[mIndex]); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1390,7 +1390,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1404,12 +1404,12 @@ namespace CSMWorld hidden ? 0 : ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mType); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1418,12 +1418,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -1436,12 +1436,12 @@ namespace CSMWorld : Column (Columns::ColumnId_QuestStatusType, ColumnBase::Display_QuestStatusType) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mQuestStatus); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1450,7 +1450,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1461,12 +1461,12 @@ namespace CSMWorld { QuestDescriptionColumn() : Column (Columns::ColumnId_QuestDescription, ColumnBase::Display_LongString) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mResponse.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1475,7 +1475,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1488,19 +1488,19 @@ namespace CSMWorld : Column (Columns::ColumnId_QuestIndex, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mDisposition; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mDisposition = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1514,12 +1514,12 @@ namespace CSMWorld journal ? ColumnBase::Display_Journal : ColumnBase::Display_Topic) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mTopicId.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1528,12 +1528,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -1544,12 +1544,12 @@ namespace CSMWorld { ActorColumn() : Column (Columns::ColumnId_Actor, ColumnBase::Display_Npc) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mActor.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1558,7 +1558,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1569,12 +1569,12 @@ namespace CSMWorld { RaceColumn() : Column (Columns::ColumnId_Race, ColumnBase::Display_Race) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mRace.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1583,7 +1583,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1594,12 +1594,12 @@ namespace CSMWorld { ClassColumn() : Column (Columns::ColumnId_Class, ColumnBase::Display_Class) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mClass.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1608,7 +1608,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1619,12 +1619,12 @@ namespace CSMWorld { PcFactionColumn() : Column (Columns::ColumnId_PcFaction, ColumnBase::Display_Faction) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mPcFaction.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1633,7 +1633,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1644,12 +1644,12 @@ namespace CSMWorld { ResponseColumn() : Column (Columns::ColumnId_Response, ColumnBase::Display_LongString) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mResponse.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1658,7 +1658,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1671,19 +1671,19 @@ namespace CSMWorld : Column (Columns::ColumnId_Disposition, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mDisposition; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mDisposition = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1696,19 +1696,19 @@ namespace CSMWorld : Column (Columns::ColumnId_Rank, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mRank); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mRank = static_cast (data.toInt()); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1721,19 +1721,19 @@ namespace CSMWorld : Column (Columns::ColumnId_PcRank, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mPCrank); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mPCrank = static_cast (data.toInt()); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1746,12 +1746,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Gender, ColumnBase::Display_Gender) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mGender); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1760,7 +1760,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1773,7 +1773,7 @@ namespace CSMWorld : Column(Columns::ColumnId_Gender, ColumnBase::Display_GenderNpc) {} - virtual QVariant get(const Record& record) const + QVariant get(const Record& record) const override { // Implemented this way to allow additional gender types in the future. if ((record.get().mData.mFlags & ESM::BodyPart::BPF_Female) == ESM::BodyPart::BPF_Female) @@ -1782,7 +1782,7 @@ namespace CSMWorld return 0; } - virtual void set(Record& record, const QVariant& data) + void set(Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1795,7 +1795,7 @@ namespace CSMWorld record.setModified(record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1808,12 +1808,12 @@ namespace CSMWorld : Column (Columns::ColumnId_EnchantmentType, ColumnBase::Display_EnchantmentType) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mType); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1822,7 +1822,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1833,19 +1833,19 @@ namespace CSMWorld { ChargesColumn2() : Column (Columns::ColumnId_Charges, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mCharge; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mCharge = data.toInt(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1857,12 +1857,12 @@ namespace CSMWorld AutoCalcColumn() : Column (Columns::ColumnId_AutoCalc, ColumnBase::Display_Boolean) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mAutocalc!=0; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1871,7 +1871,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1882,12 +1882,12 @@ namespace CSMWorld { ModelColumn() : Column (Columns::ColumnId_Model, ColumnBase::Display_Mesh) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mModel.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1896,7 +1896,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1908,12 +1908,12 @@ namespace CSMWorld VampireColumn() : Column (Columns::ColumnId_Vampire, ColumnBase::Display_Boolean) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mVampire!=0; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1922,7 +1922,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1935,12 +1935,12 @@ namespace CSMWorld : Column (Columns::ColumnId_BodyPartType, ColumnBase::Display_BodyPartType) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mPart); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1949,7 +1949,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1962,12 +1962,12 @@ namespace CSMWorld : Column (Columns::ColumnId_MeshType, ColumnBase::Display_MeshType, flags) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mData.mType); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -1976,7 +1976,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -1989,12 +1989,12 @@ namespace CSMWorld : Column (Columns::ColumnId_OwnerGlobal, ColumnBase::Display_GlobalVariable) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mGlobalVariable.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2003,7 +2003,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2016,12 +2016,12 @@ namespace CSMWorld : Column (Columns::ColumnId_RefNumCounter, ColumnBase::Display_Integer, 0) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mRefNumCounter); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2030,12 +2030,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -2048,12 +2048,12 @@ namespace CSMWorld : Column (Columns::ColumnId_RefNum, ColumnBase::Display_Integer, 0) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mRefNum.mIndex); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2062,12 +2062,12 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } - virtual bool isUserEditable() const + bool isUserEditable() const override { return false; } @@ -2080,12 +2080,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Sound, ColumnBase::Display_Sound) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mSound.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2094,7 +2094,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2107,12 +2107,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Creature, ColumnBase::Display_Creature) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mCreature.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2121,7 +2121,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2134,12 +2134,12 @@ namespace CSMWorld : Column (Columns::ColumnId_SoundGeneratorType, ColumnBase::Display_SoundGeneratorType) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return static_cast (record.get().mType); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2148,7 +2148,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2159,19 +2159,19 @@ namespace CSMWorld { BaseCostColumn() : Column (Columns::ColumnId_BaseCost, ColumnBase::Display_Float) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mBaseCost; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); record2.mData.mBaseCost = data.toFloat(); record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2184,12 +2184,12 @@ namespace CSMWorld : Column (Columns::ColumnId_School, ColumnBase::Display_School) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mData.mSchool; } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2198,7 +2198,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2216,14 +2216,14 @@ namespace CSMWorld this->mColumnId==Columns::ColumnId_Particle); } - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 ( (this->mColumnId==Columns::ColumnId_Icon ? record.get().mIcon : record.get().mParticle).c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2234,7 +2234,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2252,7 +2252,7 @@ namespace CSMWorld this->mColumnId==Columns::ColumnId_BoltObject); } - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { const std::string *string = 0; @@ -2270,7 +2270,7 @@ namespace CSMWorld return QString::fromUtf8 (string->c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { std::string *string = 0; @@ -2292,7 +2292,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2310,7 +2310,7 @@ namespace CSMWorld this->mColumnId==Columns::ColumnId_BoltSound); } - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { const std::string *string = 0; @@ -2328,7 +2328,7 @@ namespace CSMWorld return QString::fromUtf8 (string->c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { std::string *string = 0; @@ -2350,7 +2350,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2363,12 +2363,12 @@ namespace CSMWorld : Column (Columns::ColumnId_FileFormat, ColumnBase::Display_Integer) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return record.get().mFormat; } - virtual bool isEditable() const + bool isEditable() const override { return false; } @@ -2381,12 +2381,12 @@ namespace CSMWorld : Column (Columns::ColumnId_Author, ColumnBase::Display_String32) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mAuthor.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2395,7 +2395,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2408,12 +2408,12 @@ namespace CSMWorld : Column (Columns::ColumnId_FileDescription, ColumnBase::Display_LongString256) {} - virtual QVariant get (const Record& record) const + QVariant get (const Record& record) const override { return QString::fromUtf8 (record.get().mDescription.c_str()); } - virtual void set (Record& record, const QVariant& data) + void set (Record& record, const QVariant& data) override { ESXRecordT record2 = record.get(); @@ -2422,7 +2422,7 @@ namespace CSMWorld record.setModified (record2); } - virtual bool isEditable() const + bool isEditable() const override { return true; } @@ -2511,9 +2511,9 @@ namespace CSMWorld BodyPartRaceColumn(const MeshTypeColumn *meshType); - virtual QVariant get(const Record &record) const; - virtual void set(Record &record, const QVariant &data); - virtual bool isEditable() const; + QVariant get(const Record &record) const override; + void set(Record &record, const QVariant &data) override; + bool isEditable() const override; }; } diff --git a/apps/opencs/model/world/commands.hpp b/apps/opencs/model/world/commands.hpp index 58a1b1d1c5..88af32636b 100644 --- a/apps/opencs/model/world/commands.hpp +++ b/apps/opencs/model/world/commands.hpp @@ -142,9 +142,9 @@ namespace CSMWorld ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_, QUndoCommand *parent = 0); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class CreateCommand : public QUndoCommand @@ -175,9 +175,9 @@ namespace CSMWorld void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class CloneCommand : public CreateCommand @@ -191,9 +191,9 @@ namespace CSMWorld const UniversalId::Type type, QUndoCommand* parent = 0); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class RevertCommand : public QUndoCommand @@ -212,9 +212,9 @@ namespace CSMWorld virtual ~RevertCommand(); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class DeleteCommand : public QUndoCommand @@ -235,9 +235,9 @@ namespace CSMWorld virtual ~DeleteCommand(); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class ReorderRowsCommand : public QUndoCommand @@ -250,9 +250,9 @@ namespace CSMWorld ReorderRowsCommand (IdTable& model, int baseIndex, const std::vector& newOrder); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class CreatePathgridCommand : public CreateCommand @@ -261,7 +261,7 @@ namespace CSMWorld CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = 0); - virtual void redo(); + void redo() override; }; /// \brief Update cell ID according to x/y-coordinates @@ -281,9 +281,9 @@ namespace CSMWorld UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = 0); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; @@ -318,9 +318,9 @@ namespace CSMWorld DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; class AddNestedCommand : public QUndoCommand, private NestedTableStoring @@ -340,9 +340,9 @@ namespace CSMWorld AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0); - virtual void redo(); + void redo() override; - virtual void undo(); + void undo() override; }; } diff --git a/apps/opencs/model/world/idtable.hpp b/apps/opencs/model/world/idtable.hpp index 4136061e4e..6b7b8d3182 100644 --- a/apps/opencs/model/world/idtable.hpp +++ b/apps/opencs/model/world/idtable.hpp @@ -31,24 +31,23 @@ namespace CSMWorld virtual ~IdTable(); - virtual int rowCount (const QModelIndex & parent = QModelIndex()) const; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; - virtual int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; - virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; - virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - virtual Qt::ItemFlags flags (const QModelIndex & index) const; + Qt::ItemFlags flags (const QModelIndex & index) const override; - virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override; - virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) - const; + QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override; - virtual QModelIndex parent (const QModelIndex& index) const; + QModelIndex parent (const QModelIndex& index) const override; void addRecord (const std::string& id, UniversalId::Type type = UniversalId::Type_None); ///< \param type Will be ignored, unless the collection supports multiple record types @@ -66,7 +65,7 @@ namespace CSMWorld std::string getId(int row) const; - virtual QModelIndex getModelIndex (const std::string& id, int column) const; + QModelIndex getModelIndex (const std::string& id, int column) const override; void setRecord (const std::string& id, const RecordBase& record, UniversalId::Type type = UniversalId::Type_None); @@ -74,10 +73,10 @@ namespace CSMWorld const RecordBase& getRecord (const std::string& id) const; - virtual int searchColumnIndex (Columns::ColumnId id) const; + int searchColumnIndex (Columns::ColumnId id) const override; ///< Return index of column with the given \a id. If no such column exists, -1 is returned. - virtual int findColumnIndex (Columns::ColumnId id) const; + int findColumnIndex (Columns::ColumnId id) const override; ///< Return index of column with the given \a id. If no such column exists, an exception is /// thrown. @@ -85,14 +84,14 @@ namespace CSMWorld ///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices /// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex). - virtual std::pair view (int row) const; + std::pair view (int row) const override; ///< Return the UniversalId and the hint for viewing \a row. If viewing is not /// supported by this table, return (UniversalId::Type_None, ""). /// Is \a id flagged as deleted? - virtual bool isDeleted (const std::string& id) const; + bool isDeleted (const std::string& id) const override; - virtual int getColumnId(int column) const; + int getColumnId(int column) const override; protected: diff --git a/apps/opencs/model/world/idtableproxymodel.hpp b/apps/opencs/model/world/idtableproxymodel.hpp index ad5f267dbf..14d7057924 100644 --- a/apps/opencs/model/world/idtableproxymodel.hpp +++ b/apps/opencs/model/world/idtableproxymodel.hpp @@ -39,7 +39,7 @@ namespace CSMWorld virtual QModelIndex getModelIndex (const std::string& id, int column) const; - virtual void setSourceModel(QAbstractItemModel *model); + void setSourceModel(QAbstractItemModel *model) override; void setFilter (const std::shared_ptr& filter); @@ -47,9 +47,9 @@ namespace CSMWorld protected: - virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; - virtual bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const; + bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const override; QString getRecordId(int sourceRow) const; diff --git a/apps/opencs/model/world/idtree.hpp b/apps/opencs/model/world/idtree.hpp index 1539bd4a20..c525a60b88 100644 --- a/apps/opencs/model/world/idtree.hpp +++ b/apps/opencs/model/world/idtree.hpp @@ -44,22 +44,21 @@ namespace CSMWorld virtual ~IdTree(); - virtual int rowCount (const QModelIndex & parent = QModelIndex()) const; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; - virtual int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; - virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; - virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - virtual Qt::ItemFlags flags (const QModelIndex & index) const; + Qt::ItemFlags flags (const QModelIndex & index) const override; - virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override; - virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) - const; + QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override; - virtual QModelIndex parent (const QModelIndex& index) const; + QModelIndex parent (const QModelIndex& index) const override; QModelIndex getNestedModelIndex (const std::string& id, int column) const; @@ -71,7 +70,7 @@ namespace CSMWorld void addNestedRow (const QModelIndex& parent, int position); - virtual bool hasChildren (const QModelIndex& index) const; + bool hasChildren (const QModelIndex& index) const override; virtual int searchNestedColumnIndex(int parentColumn, Columns::ColumnId id); ///< \return the column index or -1 if the requested column wasn't found. diff --git a/apps/opencs/model/world/infocollection.hpp b/apps/opencs/model/world/infocollection.hpp index e5a5575c78..8f5aea6012 100644 --- a/apps/opencs/model/world/infocollection.hpp +++ b/apps/opencs/model/world/infocollection.hpp @@ -29,11 +29,11 @@ namespace CSMWorld public: - virtual int getAppendIndex (const std::string& id, - UniversalId::Type type = UniversalId::Type_None) const; + int getAppendIndex (const std::string& id, + UniversalId::Type type = UniversalId::Type_None) const override; ///< \param type Will be ignored, unless the collection supports multiple record types - virtual bool reorderRows (int baseIndex, const std::vector& newOrder); + bool reorderRows (int baseIndex, const std::vector& newOrder) override; ///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices /// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex). /// diff --git a/apps/opencs/model/world/infotableproxymodel.hpp b/apps/opencs/model/world/infotableproxymodel.hpp index 51d93f9a16..6a8e66b4f8 100644 --- a/apps/opencs/model/world/infotableproxymodel.hpp +++ b/apps/opencs/model/world/infotableproxymodel.hpp @@ -30,15 +30,15 @@ namespace CSMWorld public: InfoTableProxyModel(UniversalId::Type type, QObject *parent = 0); - virtual void setSourceModel(QAbstractItemModel *sourceModel); + void setSourceModel(QAbstractItemModel *sourceModel) override; protected: - virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; protected slots: - virtual void sourceRowsInserted(const QModelIndex &parent, int start, int end); - virtual void sourceRowsRemoved(const QModelIndex &parent, int start, int end); - virtual void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); + void sourceRowsInserted(const QModelIndex &parent, int start, int end) override; + void sourceRowsRemoved(const QModelIndex &parent, int start, int end) override; + void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override; }; } diff --git a/apps/opencs/model/world/nestedcoladapterimp.hpp b/apps/opencs/model/world/nestedcoladapterimp.hpp index 60d9830989..54780d290e 100644 --- a/apps/opencs/model/world/nestedcoladapterimp.hpp +++ b/apps/opencs/model/world/nestedcoladapterimp.hpp @@ -30,24 +30,24 @@ namespace CSMWorld public: PathgridPointListAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class PathgridEdgeListAdapter : public NestedColumnAdapter @@ -55,24 +55,24 @@ namespace CSMWorld public: PathgridEdgeListAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class FactionReactionsAdapter : public NestedColumnAdapter @@ -80,24 +80,24 @@ namespace CSMWorld public: FactionReactionsAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class FactionRanksAdapter : public NestedColumnAdapter @@ -105,24 +105,24 @@ namespace CSMWorld public: FactionRanksAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class RegionSoundListAdapter : public NestedColumnAdapter @@ -130,24 +130,24 @@ namespace CSMWorld public: RegionSoundListAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; template @@ -156,7 +156,7 @@ namespace CSMWorld public: SpellListAdapter () {} - virtual void addRow(Record& record, int position) const + void addRow(Record& record, int position) const override { ESXRecordT raceOrBthSgn = record.get(); @@ -170,7 +170,7 @@ namespace CSMWorld record.setModified (raceOrBthSgn); } - virtual void removeRow(Record& record, int rowToRemove) const + void removeRow(Record& record, int rowToRemove) const override { ESXRecordT raceOrBthSgn = record.get(); @@ -184,7 +184,7 @@ namespace CSMWorld record.setModified (raceOrBthSgn); } - virtual void setTable(Record& record, const NestedTableWrapperBase& nestedTable) const + void setTable(Record& record, const NestedTableWrapperBase& nestedTable) const override { ESXRecordT raceOrBthSgn = record.get(); @@ -194,13 +194,13 @@ namespace CSMWorld record.setModified (raceOrBthSgn); } - virtual NestedTableWrapperBase* table(const Record& record) const + NestedTableWrapperBase* table(const Record& record) const override { // deleted by dtor of NestedTableStoring return new NestedTableWrapper >(record.get().mPowers.mList); } - virtual QVariant getData(const Record& record, int subRowIndex, int subColIndex) const + QVariant getData(const Record& record, int subRowIndex, int subColIndex) const override { ESXRecordT raceOrBthSgn = record.get(); @@ -217,8 +217,8 @@ namespace CSMWorld } } - virtual void setData(Record& record, const QVariant& value, - int subRowIndex, int subColIndex) const + void setData(Record& record, const QVariant& value, + int subRowIndex, int subColIndex) const override { ESXRecordT raceOrBthSgn = record.get(); @@ -239,12 +239,12 @@ namespace CSMWorld record.setModified (raceOrBthSgn); } - virtual int getColumnsCount(const Record& record) const + int getColumnsCount(const Record& record) const override { return 1; } - virtual int getRowsCount(const Record& record) const + int getRowsCount(const Record& record) const override { return static_cast(record.get().mPowers.mList.size()); } @@ -256,7 +256,7 @@ namespace CSMWorld public: EffectsListAdapter () {} - virtual void addRow(Record& record, int position) const + void addRow(Record& record, int position) const override { ESXRecordT magic = record.get(); @@ -278,7 +278,7 @@ namespace CSMWorld record.setModified (magic); } - virtual void removeRow(Record& record, int rowToRemove) const + void removeRow(Record& record, int rowToRemove) const override { ESXRecordT magic = record.get(); @@ -292,7 +292,7 @@ namespace CSMWorld record.setModified (magic); } - virtual void setTable(Record& record, const NestedTableWrapperBase& nestedTable) const + void setTable(Record& record, const NestedTableWrapperBase& nestedTable) const override { ESXRecordT magic = record.get(); @@ -302,13 +302,13 @@ namespace CSMWorld record.setModified (magic); } - virtual NestedTableWrapperBase* table(const Record& record) const + NestedTableWrapperBase* table(const Record& record) const override { // deleted by dtor of NestedTableStoring return new NestedTableWrapper >(record.get().mEffects.mList); } - virtual QVariant getData(const Record& record, int subRowIndex, int subColIndex) const + QVariant getData(const Record& record, int subRowIndex, int subColIndex) const override { ESXRecordT magic = record.get(); @@ -370,8 +370,8 @@ namespace CSMWorld } } - virtual void setData(Record& record, const QVariant& value, - int subRowIndex, int subColIndex) const + void setData(Record& record, const QVariant& value, + int subRowIndex, int subColIndex) const override { ESXRecordT magic = record.get(); @@ -415,12 +415,12 @@ namespace CSMWorld record.setModified (magic); } - virtual int getColumnsCount(const Record& record) const + int getColumnsCount(const Record& record) const override { return 8; } - virtual int getRowsCount(const Record& record) const + int getRowsCount(const Record& record) const override { return static_cast(record.get().mEffects.mList.size()); } @@ -431,24 +431,24 @@ namespace CSMWorld public: InfoListAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class InfoConditionAdapter : public NestedColumnAdapter @@ -456,24 +456,24 @@ namespace CSMWorld public: InfoConditionAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class RaceAttributeAdapter : public NestedColumnAdapter @@ -481,24 +481,24 @@ namespace CSMWorld public: RaceAttributeAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class RaceSkillsBonusAdapter : public NestedColumnAdapter @@ -506,24 +506,24 @@ namespace CSMWorld public: RaceSkillsBonusAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class CellListAdapter : public NestedColumnAdapter @@ -531,24 +531,24 @@ namespace CSMWorld public: CellListAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; class RegionWeatherAdapter : public NestedColumnAdapter @@ -556,24 +556,24 @@ namespace CSMWorld public: RegionWeatherAdapter (); - virtual void addRow(Record& record, int position) const; + void addRow(Record& record, int position) const override; - virtual void removeRow(Record& record, int rowToRemove) const; + void removeRow(Record& record, int rowToRemove) const override; - virtual void setTable(Record& record, - const NestedTableWrapperBase& nestedTable) const; + void setTable(Record& record, + const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* table(const Record& record) const; + NestedTableWrapperBase* table(const Record& record) const override; - virtual QVariant getData(const Record& record, - int subRowIndex, int subColIndex) const; + QVariant getData(const Record& record, + int subRowIndex, int subColIndex) const override; - virtual void setData(Record& record, - const QVariant& value, int subRowIndex, int subColIndex) const; + void setData(Record& record, + const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getColumnsCount(const Record& record) const; + int getColumnsCount(const Record& record) const override; - virtual int getRowsCount(const Record& record) const; + int getRowsCount(const Record& record) const override; }; } diff --git a/apps/opencs/model/world/nestedidcollection.hpp b/apps/opencs/model/world/nestedidcollection.hpp index 56b1123659..a699d4bd66 100644 --- a/apps/opencs/model/world/nestedidcollection.hpp +++ b/apps/opencs/model/world/nestedidcollection.hpp @@ -32,24 +32,24 @@ namespace CSMWorld NestedIdCollection (); ~NestedIdCollection(); - virtual void addNestedRow(int row, int column, int position); + void addNestedRow(int row, int column, int position) override; - virtual void removeNestedRows(int row, int column, int subRow); + void removeNestedRows(int row, int column, int subRow) override; - virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const; + QVariant getNestedData(int row, int column, int subRow, int subColumn) const override; - virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn); + void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override; - virtual NestedTableWrapperBase* nestedTable(int row, int column) const; + NestedTableWrapperBase* nestedTable(int row, int column) const override; - virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable); + void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override; - virtual int getNestedRowsCount(int row, int column) const; + int getNestedRowsCount(int row, int column) const override; - virtual int getNestedColumnsCount(int row, int column) const; + int getNestedColumnsCount(int row, int column) const override; // this method is inherited from NestedCollection, not from Collection - virtual NestableColumn *getNestableColumn(int column); + NestableColumn *getNestableColumn(int column) override; void addAdapter(std::pair* > adapter); }; diff --git a/apps/opencs/model/world/nestedinfocollection.hpp b/apps/opencs/model/world/nestedinfocollection.hpp index 03c0c23496..fe2cd43faa 100644 --- a/apps/opencs/model/world/nestedinfocollection.hpp +++ b/apps/opencs/model/world/nestedinfocollection.hpp @@ -24,24 +24,24 @@ namespace CSMWorld NestedInfoCollection (); ~NestedInfoCollection(); - virtual void addNestedRow(int row, int column, int position); + void addNestedRow(int row, int column, int position) override; - virtual void removeNestedRows(int row, int column, int subRow); + void removeNestedRows(int row, int column, int subRow) override; - virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const; + QVariant getNestedData(int row, int column, int subRow, int subColumn) const override; - virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn); + void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override; - virtual NestedTableWrapperBase* nestedTable(int row, int column) const; + NestedTableWrapperBase* nestedTable(int row, int column) const override; - virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable); + void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override; - virtual int getNestedRowsCount(int row, int column) const; + int getNestedRowsCount(int row, int column) const override; - virtual int getNestedColumnsCount(int row, int column) const; + int getNestedColumnsCount(int row, int column) const override; // this method is inherited from NestedCollection, not from Collection > - virtual NestableColumn *getNestableColumn(int column); + NestableColumn *getNestableColumn(int column) override; void addAdapter(std::pair* > adapter); }; diff --git a/apps/opencs/model/world/nestedtableproxymodel.hpp b/apps/opencs/model/world/nestedtableproxymodel.hpp index 2d5a46c482..b10f8a3a36 100644 --- a/apps/opencs/model/world/nestedtableproxymodel.hpp +++ b/apps/opencs/model/world/nestedtableproxymodel.hpp @@ -39,25 +39,25 @@ namespace CSMWorld CSMWorld::IdTree* model() const; - virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const; + QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override; - virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const; + QModelIndex mapToSource(const QModelIndex& proxyIndex) const override; - virtual int rowCount(const QModelIndex& parent) const; + int rowCount(const QModelIndex& parent) const override; - virtual int columnCount(const QModelIndex& parent) const; + int columnCount(const QModelIndex& parent) const override; - virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override; - virtual QModelIndex parent(const QModelIndex& index) const; + QModelIndex parent(const QModelIndex& index) const override; - virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const; + QVariant headerData (int section, Qt::Orientation orientation, int role) const override; - virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; - virtual bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole); + bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override; - virtual Qt::ItemFlags flags(const QModelIndex& index) const; + Qt::ItemFlags flags(const QModelIndex& index) const override; private: void setupHeaderVectors(ColumnBase::Display columnId); diff --git a/apps/opencs/model/world/nestedtablewrapper.hpp b/apps/opencs/model/world/nestedtablewrapper.hpp index f0ca00dbee..7d46dff8bf 100644 --- a/apps/opencs/model/world/nestedtablewrapper.hpp +++ b/apps/opencs/model/world/nestedtablewrapper.hpp @@ -22,7 +22,7 @@ namespace CSMWorld virtual ~NestedTableWrapper() {} - virtual int size() const + int size() const override { return mNestedTable.size(); //i hope that this will be enough } diff --git a/apps/opencs/model/world/record.hpp b/apps/opencs/model/world/record.hpp index 3362f9f963..82f2abe770 100644 --- a/apps/opencs/model/world/record.hpp +++ b/apps/opencs/model/world/record.hpp @@ -45,11 +45,11 @@ namespace CSMWorld Record(State state, const ESXRecordT *base = 0, const ESXRecordT *modified = 0); - virtual RecordBase *clone() const; + RecordBase *clone() const override; - virtual RecordBase *modifiedCopy() const; + RecordBase *modifiedCopy() const override; - virtual void assign (const RecordBase& record); + void assign (const RecordBase& record) override; const ESXRecordT& get() const; ///< Throws an exception, if the record is deleted. diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 6cb6fcd9cb..7695e9acec 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -39,15 +39,14 @@ namespace CSMWorld BaseRefIdAdapter (UniversalId::Type type, const BaseColumns& base); - virtual std::string getId (const RecordBase& record) const; + std::string getId (const RecordBase& record) const override; - virtual void setId (RecordBase& record, const std::string& id); + void setId (RecordBase& record, const std::string& id) override; - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. UniversalId::Type getType() const; @@ -129,11 +128,11 @@ namespace CSMWorld ModelRefIdAdapter (UniversalId::Type type, const ModelColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -192,11 +191,11 @@ namespace CSMWorld NameRefIdAdapter (UniversalId::Type type, const NameColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -261,11 +260,11 @@ namespace CSMWorld InventoryRefIdAdapter (UniversalId::Type type, const InventoryColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -333,11 +332,11 @@ namespace CSMWorld PotionRefIdAdapter (const PotionColumns& columns, const RefIdColumn *autoCalc); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -356,11 +355,11 @@ namespace CSMWorld IngredientRefIdAdapter (const IngredientColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -378,27 +377,27 @@ namespace CSMWorld virtual ~IngredEffectRefIdAdapter(); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; struct EnchantableColumns : public InventoryColumns @@ -419,11 +418,11 @@ namespace CSMWorld EnchantableRefIdAdapter (UniversalId::Type type, const EnchantableColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -488,11 +487,11 @@ namespace CSMWorld ToolRefIdAdapter (UniversalId::Type type, const ToolColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -563,11 +562,11 @@ namespace CSMWorld ActorRefIdAdapter (UniversalId::Type type, const ActorColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -664,11 +663,11 @@ namespace CSMWorld ApparatusRefIdAdapter (const InventoryColumns& columns, const RefIdColumn *type, const RefIdColumn *quality); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -684,11 +683,11 @@ namespace CSMWorld ArmorRefIdAdapter (const EnchantableColumns& columns, const RefIdColumn *type, const RefIdColumn *health, const RefIdColumn *armor, const RefIdColumn *partRef); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -703,11 +702,11 @@ namespace CSMWorld BookRefIdAdapter (const EnchantableColumns& columns, const RefIdColumn *bookType, const RefIdColumn *skill, const RefIdColumn *text); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -721,11 +720,11 @@ namespace CSMWorld ClothingRefIdAdapter (const EnchantableColumns& columns, const RefIdColumn *type, const RefIdColumn *partRef); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -741,10 +740,10 @@ namespace CSMWorld ContainerRefIdAdapter (const NameColumns& columns, const RefIdColumn *weight, const RefIdColumn *organic, const RefIdColumn *respawn, const RefIdColumn *content); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -770,11 +769,11 @@ namespace CSMWorld CreatureRefIdAdapter (const CreatureColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -788,11 +787,11 @@ namespace CSMWorld DoorRefIdAdapter (const NameColumns& columns, const RefIdColumn *openSound, const RefIdColumn *closeSound); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -816,11 +815,11 @@ namespace CSMWorld LightRefIdAdapter (const LightColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -832,11 +831,11 @@ namespace CSMWorld MiscRefIdAdapter (const InventoryColumns& columns, const RefIdColumn *key); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -865,11 +864,11 @@ namespace CSMWorld NpcRefIdAdapter (const NpcColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -895,11 +894,11 @@ namespace CSMWorld WeaponRefIdAdapter (const WeaponColumns& columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -912,27 +911,27 @@ namespace CSMWorld NpcAttributesRefIdAdapter (); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; class NpcSkillsRefIdAdapter : public NestedRefIdAdapterBase @@ -941,27 +940,27 @@ namespace CSMWorld NpcSkillsRefIdAdapter (); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; class NpcMiscRefIdAdapter : public NestedRefIdAdapterBase @@ -974,27 +973,27 @@ namespace CSMWorld NpcMiscRefIdAdapter (); virtual ~NpcMiscRefIdAdapter(); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; class CreatureAttributesRefIdAdapter : public NestedRefIdAdapterBase @@ -1003,27 +1002,27 @@ namespace CSMWorld CreatureAttributesRefIdAdapter (); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; class CreatureAttackRefIdAdapter : public NestedRefIdAdapterBase @@ -1032,27 +1031,27 @@ namespace CSMWorld CreatureAttackRefIdAdapter (); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; class CreatureMiscRefIdAdapter : public NestedRefIdAdapterBase @@ -1065,27 +1064,27 @@ namespace CSMWorld CreatureMiscRefIdAdapter (); virtual ~CreatureMiscRefIdAdapter(); - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const; + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override; - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const; + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override; - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const; + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override; - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const; + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override; - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const; + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override; - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const; + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override; - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const; + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override; - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const; + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override; }; template @@ -1106,61 +1105,61 @@ namespace CSMWorld virtual ~EffectsRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); EffectsListAdapter::addRow(record, position); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); EffectsListAdapter::removeRow(record, rowToRemove); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); EffectsListAdapter::setTable(record, nestedTable); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); return EffectsListAdapter::table(record); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); return EffectsListAdapter::getData(record, subRowIndex, subColIndex); } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); EffectsListAdapter::setData(record, value, subRowIndex, subColIndex); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { const Record record; // not used, just a dummy return EffectsListAdapter::getColumnsCount(record); } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1183,8 +1182,8 @@ namespace CSMWorld virtual ~NestedInventoryRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1202,8 +1201,8 @@ namespace CSMWorld record.setModified (container); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1219,8 +1218,8 @@ namespace CSMWorld record.setModified (container); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1232,8 +1231,8 @@ namespace CSMWorld record.setModified (container); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1242,8 +1241,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mInventory.mList); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1264,8 +1263,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -1292,12 +1291,12 @@ namespace CSMWorld record.setModified (container); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 2; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1321,8 +1320,8 @@ namespace CSMWorld virtual ~NestedSpellRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1340,8 +1339,8 @@ namespace CSMWorld record.setModified (caster); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1357,8 +1356,8 @@ namespace CSMWorld record.setModified (caster); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1370,8 +1369,8 @@ namespace CSMWorld record.setModified (caster); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1380,8 +1379,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mSpells.mList); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1399,8 +1398,8 @@ namespace CSMWorld throw std::runtime_error("Trying to access non-existing column in the nested table!"); } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -1418,12 +1417,12 @@ namespace CSMWorld record.setModified (caster); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 1; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1447,8 +1446,8 @@ namespace CSMWorld virtual ~NestedTravelRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1475,8 +1474,8 @@ namespace CSMWorld record.setModified (traveller); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1492,8 +1491,8 @@ namespace CSMWorld record.setModified (traveller); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1505,8 +1504,8 @@ namespace CSMWorld record.setModified (traveller); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1515,8 +1514,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mTransport.mList); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1542,8 +1541,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -1569,12 +1568,12 @@ namespace CSMWorld record.setModified (traveller); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 7; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1600,8 +1599,8 @@ namespace CSMWorld // FIXME: should check if the AI package type is already in the list and use a default // that wasn't used already (in extreme case do not add anything at all? - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1627,8 +1626,8 @@ namespace CSMWorld record.setModified (actor); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1644,8 +1643,8 @@ namespace CSMWorld record.setModified (actor); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1657,8 +1656,8 @@ namespace CSMWorld record.setModified (actor); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1667,8 +1666,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mAiPackage.mList); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1768,8 +1767,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -1891,12 +1890,12 @@ namespace CSMWorld record.setModified (actor); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 19; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1921,8 +1920,8 @@ namespace CSMWorld virtual ~BodyPartRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1943,8 +1942,8 @@ namespace CSMWorld record.setModified (apparel); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1960,8 +1959,8 @@ namespace CSMWorld record.setModified (apparel); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1973,8 +1972,8 @@ namespace CSMWorld record.setModified (apparel); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -1983,8 +1982,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mParts.mParts); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2012,8 +2011,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -2035,12 +2034,12 @@ namespace CSMWorld record.setModified (apparel); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 3; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2067,11 +2066,11 @@ namespace CSMWorld LevelledListRefIdAdapter (UniversalId::Type type, const LevListColumns &columns); - virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) - const; + QVariant getData (const RefIdColumn *column, const RefIdData& data, int index) + const override; - virtual void setData (const RefIdColumn *column, RefIdData& data, int index, - const QVariant& value) const; + void setData (const RefIdColumn *column, RefIdData& data, int index, + const QVariant& value) const override; ///< If the data type does not match an exception is thrown. }; @@ -2117,32 +2116,32 @@ namespace CSMWorld virtual ~NestedListLevListRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { throw std::logic_error ("cannot add a row to a fixed table"); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { throw std::logic_error ("cannot remove a row to a fixed table"); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { throw std::logic_error ("table operation not supported"); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { throw std::logic_error ("table operation not supported"); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2171,8 +2170,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -2240,12 +2239,12 @@ namespace CSMWorld record.setModified (leveled); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 3; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { return 1; // fixed at size 1 } @@ -2267,8 +2266,8 @@ namespace CSMWorld virtual ~NestedLevListRefIdAdapter() {} - virtual void addNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int position) const + void addNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int position) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2288,8 +2287,8 @@ namespace CSMWorld record.setModified (leveled); } - virtual void removeNestedRow (const RefIdColumn *column, - RefIdData& data, int index, int rowToRemove) const + void removeNestedRow (const RefIdColumn *column, + RefIdData& data, int index, int rowToRemove) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2305,8 +2304,8 @@ namespace CSMWorld record.setModified (leveled); } - virtual void setNestedTable (const RefIdColumn* column, - RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const + void setNestedTable (const RefIdColumn* column, + RefIdData& data, int index, const NestedTableWrapperBase& nestedTable) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2318,8 +2317,8 @@ namespace CSMWorld record.setModified (leveled); } - virtual NestedTableWrapperBase* nestedTable (const RefIdColumn* column, - const RefIdData& data, int index) const + NestedTableWrapperBase* nestedTable (const RefIdColumn* column, + const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2328,8 +2327,8 @@ namespace CSMWorld return new NestedTableWrapper >(record.get().mList); } - virtual QVariant getNestedData (const RefIdColumn *column, - const RefIdData& data, int index, int subRowIndex, int subColIndex) const + QVariant getNestedData (const RefIdColumn *column, + const RefIdData& data, int index, int subRowIndex, int subColIndex) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); @@ -2350,8 +2349,8 @@ namespace CSMWorld } } - virtual void setNestedData (const RefIdColumn *column, - RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const + void setNestedData (const RefIdColumn *column, + RefIdData& data, int row, const QVariant& value, int subRowIndex, int subColIndex) const override { Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, mType))); @@ -2372,12 +2371,12 @@ namespace CSMWorld record.setModified (leveled); } - virtual int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const + int getNestedColumnsCount(const RefIdColumn *column, const RefIdData& data) const override { return 2; } - virtual int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const + int getNestedRowsCount(const RefIdColumn *column, const RefIdData& data, int index) const override { const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, mType))); diff --git a/apps/opencs/model/world/refidcollection.hpp b/apps/opencs/model/world/refidcollection.hpp index 48558d1c25..e85263ac13 100644 --- a/apps/opencs/model/world/refidcollection.hpp +++ b/apps/opencs/model/world/refidcollection.hpp @@ -32,9 +32,9 @@ namespace CSMWorld int flag = Flag_Table | Flag_Dialogue, bool editable = true, bool userEditable = true); - virtual bool isEditable() const; + bool isEditable() const override; - virtual bool isUserEditable() const; + bool isUserEditable() const override; }; class RefIdCollection : public CollectionBase, public NestedCollection @@ -60,82 +60,82 @@ namespace CSMWorld virtual ~RefIdCollection(); - virtual int getSize() const; + int getSize() const override; - virtual std::string getId (int index) const; + std::string getId (int index) const override; - virtual int getIndex (const std::string& id) const; + int getIndex (const std::string& id) const override; - virtual int getColumns() const; + int getColumns() const override; - virtual const ColumnBase& getColumn (int column) const; + const ColumnBase& getColumn (int column) const override; - virtual QVariant getData (int index, int column) const; + QVariant getData (int index, int column) const override; - virtual void setData (int index, int column, const QVariant& data); + void setData (int index, int column, const QVariant& data) override; - virtual void removeRows (int index, int count); + void removeRows (int index, int count) override; - virtual void cloneRecord(const std::string& origin, + void cloneRecord(const std::string& origin, const std::string& destination, - const UniversalId::Type type); + const UniversalId::Type type) override; - virtual bool touchRecord(const std::string& id); + bool touchRecord(const std::string& id) override; - virtual void appendBlankRecord (const std::string& id, UniversalId::Type type); + void appendBlankRecord (const std::string& id, UniversalId::Type type) override; ///< \param type Will be ignored, unless the collection supports multiple record types - virtual int searchId (const std::string& id) const; + int searchId (const std::string& id) const override; ////< Search record with \a id. /// \return index of record (if found) or -1 (not found) - virtual void replace (int index, const RecordBase& record); + void replace (int index, const RecordBase& record) override; ///< If the record type does not match, an exception is thrown. /// /// \attention \a record must not change the ID. - virtual void appendRecord (const RecordBase& record, UniversalId::Type type); + void appendRecord (const RecordBase& record, UniversalId::Type type) override; ///< If the record type does not match, an exception is thrown. /// ///< \param type Will be ignored, unless the collection supports multiple record types - virtual const RecordBase& getRecord (const std::string& id) const; + const RecordBase& getRecord (const std::string& id) const override; - virtual const RecordBase& getRecord (int index) const; + const RecordBase& getRecord (int index) const override; void load (ESM::ESMReader& reader, bool base, UniversalId::Type type); - virtual int getAppendIndex (const std::string& id, UniversalId::Type type) const; + int getAppendIndex (const std::string& id, UniversalId::Type type) const override; ///< \param type Will be ignored, unless the collection supports multiple record types - virtual std::vector getIds (bool listDeleted) const; + std::vector getIds (bool listDeleted) const override; ///< Return a sorted collection of all IDs /// /// \param listDeleted include deleted record in the list - virtual bool reorderRows (int baseIndex, const std::vector& newOrder); + bool reorderRows (int baseIndex, const std::vector& newOrder) override; ///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices /// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex). /// /// \return Success? - virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const; + QVariant getNestedData(int row, int column, int subRow, int subColumn) const override; - virtual NestedTableWrapperBase* nestedTable(int row, int column) const; + NestedTableWrapperBase* nestedTable(int row, int column) const override; - virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable); + void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override; - virtual int getNestedRowsCount(int row, int column) const; + int getNestedRowsCount(int row, int column) const override; - virtual int getNestedColumnsCount(int row, int column) const; + int getNestedColumnsCount(int row, int column) const override; - NestableColumn *getNestableColumn(int column); + NestableColumn *getNestableColumn(int column) override; - virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn); + void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override; - virtual void removeNestedRows(int row, int column, int subRow); + void removeNestedRows(int row, int column, int subRow) override; - virtual void addNestedRow(int row, int col, int position); + void addNestedRow(int row, int col, int position) override; void save (int index, ESM::ESMWriter& writer) const; diff --git a/apps/opencs/model/world/refiddata.hpp b/apps/opencs/model/world/refiddata.hpp index 94f641edc1..1480bb71d9 100644 --- a/apps/opencs/model/world/refiddata.hpp +++ b/apps/opencs/model/world/refiddata.hpp @@ -66,24 +66,24 @@ namespace CSMWorld { std::vector > mContainer; - virtual int getSize() const; + int getSize() const override; - virtual const RecordBase& getRecord (int index) const; + const RecordBase& getRecord (int index) const override; - virtual RecordBase& getRecord (int index); + RecordBase& getRecord (int index) override; - virtual void appendRecord (const std::string& id, bool base); + void appendRecord (const std::string& id, bool base) override; - virtual void insertRecord (RecordBase& record); + void insertRecord (RecordBase& record) override; - virtual int load (ESM::ESMReader& reader, bool base); + int load (ESM::ESMReader& reader, bool base) override; ///< \return index of a loaded record or -1 if no record was loaded - virtual void erase (int index, int count); + void erase (int index, int count) override; - virtual std::string getId (int index) const; + std::string getId (int index) const override; - virtual void save (int index, ESM::ESMWriter& writer) const; + void save (int index, ESM::ESMWriter& writer) const override; }; template diff --git a/apps/opencs/model/world/regionmap.hpp b/apps/opencs/model/world/regionmap.hpp index 7d7685e894..1de7f1cdb9 100644 --- a/apps/opencs/model/world/regionmap.hpp +++ b/apps/opencs/model/world/regionmap.hpp @@ -91,15 +91,15 @@ namespace CSMWorld RegionMap (Data& data); - virtual int rowCount (const QModelIndex& parent = QModelIndex()) const; + int rowCount (const QModelIndex& parent = QModelIndex()) const override; - virtual int columnCount (const QModelIndex& parent = QModelIndex()) const; + int columnCount (const QModelIndex& parent = QModelIndex()) const override; - virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const override; ///< \note Calling this function with role==Role_CellId may return the ID of a cell /// that does not exist. - virtual Qt::ItemFlags flags (const QModelIndex& index) const; + Qt::ItemFlags flags (const QModelIndex& index) const override; private slots: diff --git a/apps/opencs/model/world/resourcetable.hpp b/apps/opencs/model/world/resourcetable.hpp index 7d538df530..8a3fab8a21 100644 --- a/apps/opencs/model/world/resourcetable.hpp +++ b/apps/opencs/model/world/resourcetable.hpp @@ -18,41 +18,40 @@ namespace CSMWorld virtual ~ResourceTable(); - virtual int rowCount (const QModelIndex & parent = QModelIndex()) const; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; - virtual int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; - virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; - virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - virtual Qt::ItemFlags flags (const QModelIndex & index) const; + Qt::ItemFlags flags (const QModelIndex & index) const override; - virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) - const; + QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override; - virtual QModelIndex parent (const QModelIndex& index) const; + QModelIndex parent (const QModelIndex& index) const override; - virtual QModelIndex getModelIndex (const std::string& id, int column) const; + QModelIndex getModelIndex (const std::string& id, int column) const override; /// Return index of column with the given \a id. If no such column exists, -1 is /// returned. - virtual int searchColumnIndex (Columns::ColumnId id) const; + int searchColumnIndex (Columns::ColumnId id) const override; /// Return index of column with the given \a id. If no such column exists, an /// exception is thrown. - virtual int findColumnIndex (Columns::ColumnId id) const; + int findColumnIndex (Columns::ColumnId id) const override; /// Return the UniversalId and the hint for viewing \a row. If viewing is not /// supported by this table, return (UniversalId::Type_None, ""). - virtual std::pair view (int row) const; + std::pair view (int row) const override; /// Is \a id flagged as deleted? - virtual bool isDeleted (const std::string& id) const; + bool isDeleted (const std::string& id) const override; - virtual int getColumnId (int column) const; + int getColumnId (int column) const override; /// Signal Qt that the data is about to change. void beginReset(); diff --git a/apps/opencs/model/world/scriptcontext.hpp b/apps/opencs/model/world/scriptcontext.hpp index 2cd59f070f..8e1a5e57b8 100644 --- a/apps/opencs/model/world/scriptcontext.hpp +++ b/apps/opencs/model/world/scriptcontext.hpp @@ -23,23 +23,23 @@ namespace CSMWorld ScriptContext (const Data& data); - virtual bool canDeclareLocals() const; + bool canDeclareLocals() const override; ///< Is the compiler allowed to declare local variables? - virtual char getGlobalType (const std::string& name) const; + char getGlobalType (const std::string& name) const override; ///< 'l: long, 's': short, 'f': float, ' ': does not exist. - virtual std::pair getMemberType (const std::string& name, - const std::string& id) const; + std::pair getMemberType (const std::string& name, + const std::string& id) const override; ///< Return type of member variable \a name in script \a id or in script of reference of /// \a id /// \return first: 'l: long, 's': short, 'f': float, ' ': does not exist. /// second: true: script of reference - virtual bool isId (const std::string& name) const; + bool isId (const std::string& name) const override; ///< Does \a name match an ID, that can be referenced? - virtual bool isJournalId (const std::string& name) const; + bool isJournalId (const std::string& name) const override; ///< Does \a name match a journal ID? void invalidateIds(); diff --git a/apps/opencs/model/world/subcellcollection.hpp b/apps/opencs/model/world/subcellcollection.hpp index 496cb06430..a60929680b 100644 --- a/apps/opencs/model/world/subcellcollection.hpp +++ b/apps/opencs/model/world/subcellcollection.hpp @@ -20,7 +20,7 @@ namespace CSMWorld { const IdCollection& mCells; - virtual void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted); + void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted) override; public: diff --git a/apps/opencs/model/world/tablemimedata.hpp b/apps/opencs/model/world/tablemimedata.hpp index 3be8054bdb..2345249122 100644 --- a/apps/opencs/model/world/tablemimedata.hpp +++ b/apps/opencs/model/world/tablemimedata.hpp @@ -36,7 +36,7 @@ namespace CSMWorld ~TableMimeData(); - virtual QStringList formats() const; + QStringList formats() const override; std::string getIcon() const; diff --git a/apps/opencs/view/doc/loader.hpp b/apps/opencs/view/doc/loader.hpp index e004007c99..24cbee7884 100644 --- a/apps/opencs/view/doc/loader.hpp +++ b/apps/opencs/view/doc/loader.hpp @@ -38,7 +38,7 @@ namespace CSVDoc private: - void closeEvent (QCloseEvent *event); + void closeEvent (QCloseEvent *event) override; public: diff --git a/apps/opencs/view/doc/newgame.hpp b/apps/opencs/view/doc/newgame.hpp index 70e9d684b0..e3c6f53ca5 100644 --- a/apps/opencs/view/doc/newgame.hpp +++ b/apps/opencs/view/doc/newgame.hpp @@ -44,7 +44,7 @@ namespace CSVDoc void create(); - void reject(); + void reject() override; }; } diff --git a/apps/opencs/view/doc/runlogsubview.hpp b/apps/opencs/view/doc/runlogsubview.hpp index cfb676a375..e7b490fff0 100644 --- a/apps/opencs/view/doc/runlogsubview.hpp +++ b/apps/opencs/view/doc/runlogsubview.hpp @@ -13,7 +13,7 @@ namespace CSVDoc RunLogSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; }; } diff --git a/apps/opencs/view/doc/sizehint.hpp b/apps/opencs/view/doc/sizehint.hpp index cf5a02580e..1b3c52eb8a 100644 --- a/apps/opencs/view/doc/sizehint.hpp +++ b/apps/opencs/view/doc/sizehint.hpp @@ -14,7 +14,7 @@ namespace CSVDoc SizeHintWidget(QWidget *parent = 0); ~SizeHintWidget(); - virtual QSize sizeHint() const; + QSize sizeHint() const override; void setSizeHint(const QSize &size); }; } diff --git a/apps/opencs/view/doc/subview.hpp b/apps/opencs/view/doc/subview.hpp index 44b81743f9..ca9ca82252 100644 --- a/apps/opencs/view/doc/subview.hpp +++ b/apps/opencs/view/doc/subview.hpp @@ -34,7 +34,7 @@ namespace CSVDoc void setUniversalId(const CSMWorld::UniversalId& id); - bool event (QEvent *event); + bool event (QEvent *event) override; public: @@ -54,7 +54,7 @@ namespace CSVDoc private: - void closeEvent (QCloseEvent *event); + void closeEvent (QCloseEvent *event) override; signals: diff --git a/apps/opencs/view/doc/subviewfactoryimp.hpp b/apps/opencs/view/doc/subviewfactoryimp.hpp index 6701379859..152b443a34 100644 --- a/apps/opencs/view/doc/subviewfactoryimp.hpp +++ b/apps/opencs/view/doc/subviewfactoryimp.hpp @@ -12,7 +12,7 @@ namespace CSVDoc { public: - virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); + CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override; }; template @@ -32,7 +32,7 @@ namespace CSVDoc SubViewFactoryWithCreator (bool sorting = true); - virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); + CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override; }; template diff --git a/apps/opencs/view/doc/view.hpp b/apps/opencs/view/doc/view.hpp index 87c312412c..322bcdfb7f 100644 --- a/apps/opencs/view/doc/view.hpp +++ b/apps/opencs/view/doc/view.hpp @@ -64,7 +64,7 @@ namespace CSVDoc private: - void closeEvent (QCloseEvent *event); + void closeEvent (QCloseEvent *event) override; QAction* createMenuEntry(CSMWorld::UniversalId::Type type, QMenu* menu, const char* shortcutName); QAction* createMenuEntry(const std::string& title, const std::string& iconName, QMenu* menu, const char* shortcutName); diff --git a/apps/opencs/view/filter/filterbox.hpp b/apps/opencs/view/filter/filterbox.hpp index e794a9880f..94aa80b844 100644 --- a/apps/opencs/view/filter/filterbox.hpp +++ b/apps/opencs/view/filter/filterbox.hpp @@ -34,11 +34,11 @@ namespace CSVFilter private: - void dragEnterEvent (QDragEnterEvent* event); + void dragEnterEvent (QDragEnterEvent* event) override; - void dropEvent (QDropEvent* event); + void dropEvent (QDropEvent* event) override; - void dragMoveEvent(QDragMoveEvent *event); + void dragMoveEvent(QDragMoveEvent *event) override; signals: void recordFilterChanged (std::shared_ptr filter); diff --git a/apps/opencs/view/prefs/contextmenulist.hpp b/apps/opencs/view/prefs/contextmenulist.hpp index a3b6c97350..f527057d2f 100644 --- a/apps/opencs/view/prefs/contextmenulist.hpp +++ b/apps/opencs/view/prefs/contextmenulist.hpp @@ -18,9 +18,9 @@ namespace CSVPrefs protected: - void contextMenuEvent(QContextMenuEvent* e); + void contextMenuEvent(QContextMenuEvent* e) override; - void mousePressEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e) override; private slots: diff --git a/apps/opencs/view/prefs/dialogue.hpp b/apps/opencs/view/prefs/dialogue.hpp index ce017209a4..2e09756496 100644 --- a/apps/opencs/view/prefs/dialogue.hpp +++ b/apps/opencs/view/prefs/dialogue.hpp @@ -34,7 +34,7 @@ namespace CSVPrefs protected: - void closeEvent (QCloseEvent *event); + void closeEvent (QCloseEvent *event) override; public slots: diff --git a/apps/opencs/view/prefs/pagebase.hpp b/apps/opencs/view/prefs/pagebase.hpp index 91a4dee5ba..ce5b378b35 100644 --- a/apps/opencs/view/prefs/pagebase.hpp +++ b/apps/opencs/view/prefs/pagebase.hpp @@ -26,7 +26,7 @@ namespace CSVPrefs protected: - void contextMenuEvent(QContextMenuEvent*); + void contextMenuEvent(QContextMenuEvent*) override; private slots: diff --git a/apps/opencs/view/render/cameracontroller.hpp b/apps/opencs/view/render/cameracontroller.hpp index 658e572c5f..dff0f212e9 100644 --- a/apps/opencs/view/render/cameracontroller.hpp +++ b/apps/opencs/view/render/cameracontroller.hpp @@ -96,10 +96,10 @@ namespace CSVRender void fixUpAxis(const osg::Vec3d& up); void unfixUpAxis(); - void handleMouseMoveEvent(int x, int y); - void handleMouseScrollEvent(int x); + void handleMouseMoveEvent(int x, int y) override; + void handleMouseScrollEvent(int x) override; - void update(double dt); + void update(double dt) override; private: @@ -152,10 +152,10 @@ namespace CSVRender void setOrbitSpeedMultiplier(double value); void setPickingMask(unsigned int value); - void handleMouseMoveEvent(int x, int y); - void handleMouseScrollEvent(int x); + void handleMouseMoveEvent(int x, int y) override; + void handleMouseScrollEvent(int x) override; - void update(double dt); + void update(double dt) override; /// \brief Flag controller to be re-initialized. void reset(); diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index 056c50e45f..c18c29efe8 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -45,7 +45,7 @@ namespace CSVRender { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { traverse(node, nv); CellNodeContainer* container = static_cast(node->getUserData()); diff --git a/apps/opencs/view/render/cellarrow.hpp b/apps/opencs/view/render/cellarrow.hpp index 4523561946..9a49b80db0 100644 --- a/apps/opencs/view/render/cellarrow.hpp +++ b/apps/opencs/view/render/cellarrow.hpp @@ -27,7 +27,7 @@ namespace CSVRender CellArrow *getCellArrow() const; - virtual QString getToolTip (bool hideBasics) const; + QString getToolTip (bool hideBasics) const override; }; diff --git a/apps/opencs/view/render/editmode.hpp b/apps/opencs/view/render/editmode.hpp index 9115943273..c0482c81a6 100644 --- a/apps/opencs/view/render/editmode.hpp +++ b/apps/opencs/view/render/editmode.hpp @@ -34,7 +34,7 @@ namespace CSVRender unsigned int getInteractionMask() const; - virtual void activate (CSVWidget::SceneToolbar *toolbar); + void activate (CSVWidget::SceneToolbar *toolbar) override; /// Default-implementation: Ignored. virtual void setEditLock (bool locked); @@ -90,15 +90,15 @@ namespace CSVRender virtual void dragWheel (int diff, double speedFactor); /// Default-implementation: ignored - virtual void dragEnterEvent (QDragEnterEvent *event); + void dragEnterEvent (QDragEnterEvent *event) override; /// Default-implementation: ignored - virtual void dropEvent (QDropEvent *event); + void dropEvent (QDropEvent *event) override; /// Default-implementation: ignored - virtual void dragMoveEvent (QDragMoveEvent *event); + void dragMoveEvent (QDragMoveEvent *event) override; - virtual void mouseMoveEvent (QMouseEvent *event); + void mouseMoveEvent (QMouseEvent *event) override; /// Default: return -1 virtual int getSubMode() const; diff --git a/apps/opencs/view/render/instancemode.hpp b/apps/opencs/view/render/instancemode.hpp index beb60aff37..29955feef6 100644 --- a/apps/opencs/view/render/instancemode.hpp +++ b/apps/opencs/view/render/instancemode.hpp @@ -64,41 +64,41 @@ namespace CSVRender InstanceMode (WorldspaceWidget *worldspaceWidget, osg::ref_ptr parentNode, QWidget *parent = 0); - virtual void activate (CSVWidget::SceneToolbar *toolbar); + void activate (CSVWidget::SceneToolbar *toolbar) override; - virtual void deactivate (CSVWidget::SceneToolbar *toolbar); + void deactivate (CSVWidget::SceneToolbar *toolbar) override; - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void primaryOpenPressed (const WorldspaceHitResult& hit); + void primaryOpenPressed (const WorldspaceHitResult& hit) override; - virtual void primaryEditPressed (const WorldspaceHitResult& hit); + void primaryEditPressed (const WorldspaceHitResult& hit) override; - virtual void secondaryEditPressed (const WorldspaceHitResult& hit); + void secondaryEditPressed (const WorldspaceHitResult& hit) override; - virtual void primarySelectPressed (const WorldspaceHitResult& hit); + void primarySelectPressed (const WorldspaceHitResult& hit) override; - virtual void secondarySelectPressed (const WorldspaceHitResult& hit); + void secondarySelectPressed (const WorldspaceHitResult& hit) override; - virtual bool primaryEditStartDrag (const QPoint& pos); + bool primaryEditStartDrag (const QPoint& pos) override; - virtual bool secondaryEditStartDrag (const QPoint& pos); + bool secondaryEditStartDrag (const QPoint& pos) override; - virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor); + void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) override; - virtual void dragCompleted(const QPoint& pos); + void dragCompleted(const QPoint& pos) override; /// \note dragAborted will not be called, if the drag is aborted via changing /// editing mode - virtual void dragAborted(); + void dragAborted() override; - virtual void dragWheel (int diff, double speedFactor); + void dragWheel (int diff, double speedFactor) override; - virtual void dragEnterEvent (QDragEnterEvent *event); + void dragEnterEvent (QDragEnterEvent *event) override; - virtual void dropEvent (QDropEvent *event); + void dropEvent (QDropEvent *event) override; - virtual int getSubMode() const; + int getSubMode() const override; signals: diff --git a/apps/opencs/view/render/instanceselectionmode.hpp b/apps/opencs/view/render/instanceselectionmode.hpp index a590240d97..a238116710 100644 --- a/apps/opencs/view/render/instanceselectionmode.hpp +++ b/apps/opencs/view/render/instanceselectionmode.hpp @@ -21,7 +21,7 @@ namespace CSVRender /// /// \return Have there been any menu items to be added (if menu is 0 and there /// items to be added, the function must return true anyway. - bool createContextMenu(QMenu* menu); + bool createContextMenu(QMenu* menu) override; private: diff --git a/apps/opencs/view/render/lighting.cpp b/apps/opencs/view/render/lighting.cpp index f62e86148b..82ad43e6ad 100644 --- a/apps/opencs/view/render/lighting.cpp +++ b/apps/opencs/view/render/lighting.cpp @@ -14,7 +14,7 @@ public: , mIndex(index) { } - virtual void apply(osg::Switch &switchNode) + void apply(osg::Switch &switchNode) override { if (switchNode.getName() == Constants::NightDayLabel) switchNode.setSingleChildOn(mIndex); diff --git a/apps/opencs/view/render/lightingbright.hpp b/apps/opencs/view/render/lightingbright.hpp index 7bdebfd3d5..aa14927524 100644 --- a/apps/opencs/view/render/lightingbright.hpp +++ b/apps/opencs/view/render/lightingbright.hpp @@ -17,11 +17,11 @@ namespace CSVRender LightingBright(); - virtual void activate (osg::Group* rootNode, bool /*isExterior*/); + void activate (osg::Group* rootNode, bool /*isExterior*/) override; - virtual void deactivate(); + void deactivate() override; - virtual osg::Vec4f getAmbientColour(osg::Vec4f* defaultAmbient); + osg::Vec4f getAmbientColour(osg::Vec4f* defaultAmbient) override; }; } diff --git a/apps/opencs/view/render/lightingday.hpp b/apps/opencs/view/render/lightingday.hpp index 516dd2bbf6..eafc6b8e81 100644 --- a/apps/opencs/view/render/lightingday.hpp +++ b/apps/opencs/view/render/lightingday.hpp @@ -11,11 +11,11 @@ namespace CSVRender LightingDay(); - virtual void activate (osg::Group* rootNode, bool /*isExterior*/); + void activate (osg::Group* rootNode, bool /*isExterior*/) override; - virtual void deactivate(); + void deactivate() override; - virtual osg::Vec4f getAmbientColour(osg::Vec4f *defaultAmbient); + osg::Vec4f getAmbientColour(osg::Vec4f *defaultAmbient) override; }; } diff --git a/apps/opencs/view/render/lightingnight.hpp b/apps/opencs/view/render/lightingnight.hpp index 3f03150cd4..bfa94ce972 100644 --- a/apps/opencs/view/render/lightingnight.hpp +++ b/apps/opencs/view/render/lightingnight.hpp @@ -11,10 +11,10 @@ namespace CSVRender LightingNight(); - virtual void activate (osg::Group* rootNode, bool isExterior); - virtual void deactivate(); + void activate (osg::Group* rootNode, bool isExterior) override; + void deactivate() override; - virtual osg::Vec4f getAmbientColour(osg::Vec4f *defaultAmbient); + osg::Vec4f getAmbientColour(osg::Vec4f *defaultAmbient) override; }; } diff --git a/apps/opencs/view/render/object.hpp b/apps/opencs/view/render/object.hpp index 4d1763f80f..a19d642234 100644 --- a/apps/opencs/view/render/object.hpp +++ b/apps/opencs/view/render/object.hpp @@ -54,7 +54,7 @@ namespace CSVRender Object* mObject; - virtual QString getToolTip (bool hideBasics) const; + QString getToolTip (bool hideBasics) const override; }; class ObjectMarkerTag : public ObjectTag diff --git a/apps/opencs/view/render/orbitcameramode.hpp b/apps/opencs/view/render/orbitcameramode.hpp index 90c9e97f4b..10bc97b0f1 100644 --- a/apps/opencs/view/render/orbitcameramode.hpp +++ b/apps/opencs/view/render/orbitcameramode.hpp @@ -24,9 +24,9 @@ namespace CSVRender QWidget* parent = nullptr); ~OrbitCameraMode(); - virtual void activate(CSVWidget::SceneToolbar* toolbar); - virtual void deactivate(CSVWidget::SceneToolbar* toolbar); - virtual bool createContextMenu(QMenu* menu); + void activate(CSVWidget::SceneToolbar* toolbar) override; + void deactivate(CSVWidget::SceneToolbar* toolbar) override; + bool createContextMenu(QMenu* menu) override; private: diff --git a/apps/opencs/view/render/pagedworldspacewidget.hpp b/apps/opencs/view/render/pagedworldspacewidget.hpp index fcc55fe7d2..d17670cfa7 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.hpp +++ b/apps/opencs/view/render/pagedworldspacewidget.hpp @@ -39,26 +39,26 @@ namespace CSVRender /// \return Any cells added or removed? bool adjustCells(); - virtual void referenceableDataChanged (const QModelIndex& topLeft, - const QModelIndex& bottomRight); + void referenceableDataChanged (const QModelIndex& topLeft, + const QModelIndex& bottomRight) override; - virtual void referenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void referenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void referenceableAdded (const QModelIndex& index, int start, int end); + void referenceableAdded (const QModelIndex& index, int start, int end) override; - virtual void referenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight); + void referenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight) override; - virtual void referenceAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void referenceAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void referenceAdded (const QModelIndex& index, int start, int end); + void referenceAdded (const QModelIndex& index, int start, int end) override; - virtual void pathgridDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight); + void pathgridDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight) override; - virtual void pathgridAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void pathgridAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void pathgridAdded (const QModelIndex& parent, int start, int end); + void pathgridAdded (const QModelIndex& parent, int start, int end) override; - virtual std::string getStartupInstruction(); + std::string getStartupInstruction() override; /// \note Does not update the view or any cell marker void addCellToScene (const CSMWorld::CellCoordinates& coordinates); @@ -86,45 +86,45 @@ namespace CSVRender virtual ~PagedWorldspaceWidget(); /// Decodes the the hint string to set of cell that are rendered. - void useViewHint (const std::string& hint); + void useViewHint (const std::string& hint) override; void setCellSelection(const CSMWorld::CellSelection& selection); const CSMWorld::CellSelection& getCellSelection() const; /// \return Drop handled? - virtual bool handleDrop (const std::vector& data, - DropType type); + bool handleDrop (const std::vector& data, + DropType type) override; - virtual dropRequirments getDropRequirements(DropType type) const; + dropRequirments getDropRequirements(DropType type) const override; /// \attention The created tool is not added to the toolbar (via addTool). Doing /// that is the responsibility of the calling function. virtual CSVWidget::SceneToolToggle2 *makeControlVisibilitySelector ( CSVWidget::SceneToolbar *parent); - virtual unsigned int getVisibilityMask() const; + unsigned int getVisibilityMask() const override; /// \param elementMask Elements to be affected by the clear operation - virtual void clearSelection (int elementMask); + void clearSelection (int elementMask) override; /// \param elementMask Elements to be affected by the select operation - virtual void invertSelection (int elementMask); + void invertSelection (int elementMask) override; /// \param elementMask Elements to be affected by the select operation - virtual void selectAll (int elementMask); + void selectAll (int elementMask) override; // Select everything that references the same ID as at least one of the elements // already selected // /// \param elementMask Elements to be affected by the select operation - virtual void selectAllWithSameParentId (int elementMask); + void selectAllWithSameParentId (int elementMask) override; - virtual std::string getCellId (const osg::Vec3f& point) const; + std::string getCellId (const osg::Vec3f& point) const override; - virtual Cell* getCell(const osg::Vec3d& point) const; + Cell* getCell(const osg::Vec3d& point) const override; - virtual Cell* getCell(const CSMWorld::CellCoordinates& coords) const; + Cell* getCell(const CSMWorld::CellCoordinates& coords) const override; void setCellAlteredHeight(const CSMWorld::CellCoordinates& coords, int inCellX, int inCellY, float height); @@ -132,24 +132,24 @@ namespace CSVRender void resetAllAlteredHeights(); - virtual std::vector > getSelection (unsigned int elementMask) - const; + std::vector > getSelection (unsigned int elementMask) + const override; - virtual std::vector > getEdited (unsigned int elementMask) - const; + std::vector > getEdited (unsigned int elementMask) + const override; - virtual void setSubMode (int subMode, unsigned int elementMask); + void setSubMode (int subMode, unsigned int elementMask) override; /// Erase all overrides and restore the visual representation to its true state. - virtual void reset (unsigned int elementMask); + void reset (unsigned int elementMask) override; protected: - virtual void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle2 *tool); + void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle2 *tool) override; - virtual void addEditModeSelectorButtons (CSVWidget::SceneToolMode *tool); + void addEditModeSelectorButtons (CSVWidget::SceneToolMode *tool) override; - virtual void handleInteractionPress (const WorldspaceHitResult& hit, InteractionType type); + void handleInteractionPress (const WorldspaceHitResult& hit, InteractionType type) override; signals: diff --git a/apps/opencs/view/render/pathgrid.cpp b/apps/opencs/view/render/pathgrid.cpp index d8acfe2e13..7f0454d8fe 100644 --- a/apps/opencs/view/render/pathgrid.cpp +++ b/apps/opencs/view/render/pathgrid.cpp @@ -23,7 +23,7 @@ namespace CSVRender { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { PathgridTag* tag = static_cast(node->getUserData()); tag->getPathgrid()->update(); diff --git a/apps/opencs/view/render/pathgrid.hpp b/apps/opencs/view/render/pathgrid.hpp index 181a62b442..8f5d45a487 100644 --- a/apps/opencs/view/render/pathgrid.hpp +++ b/apps/opencs/view/render/pathgrid.hpp @@ -40,7 +40,7 @@ namespace CSVRender Pathgrid* getPathgrid () const; - virtual QString getToolTip (bool hideBasics) const; + QString getToolTip (bool hideBasics) const override; private: diff --git a/apps/opencs/view/render/pathgridmode.hpp b/apps/opencs/view/render/pathgridmode.hpp index a012a67e4a..6d8f96e8c3 100644 --- a/apps/opencs/view/render/pathgridmode.hpp +++ b/apps/opencs/view/render/pathgridmode.hpp @@ -17,31 +17,31 @@ namespace CSVRender PathgridMode(WorldspaceWidget* worldspace, QWidget* parent=0); - virtual void activate(CSVWidget::SceneToolbar* toolbar); + void activate(CSVWidget::SceneToolbar* toolbar) override; - virtual void deactivate(CSVWidget::SceneToolbar* toolbar); + void deactivate(CSVWidget::SceneToolbar* toolbar) override; - virtual void primaryOpenPressed(const WorldspaceHitResult& hit); + void primaryOpenPressed(const WorldspaceHitResult& hit) override; - virtual void primaryEditPressed(const WorldspaceHitResult& hit); + void primaryEditPressed(const WorldspaceHitResult& hit) override; - virtual void secondaryEditPressed(const WorldspaceHitResult& hit); + void secondaryEditPressed(const WorldspaceHitResult& hit) override; - virtual void primarySelectPressed(const WorldspaceHitResult& hit); + void primarySelectPressed(const WorldspaceHitResult& hit) override; - virtual void secondarySelectPressed(const WorldspaceHitResult& hit); + void secondarySelectPressed(const WorldspaceHitResult& hit) override; - virtual bool primaryEditStartDrag (const QPoint& pos); + bool primaryEditStartDrag (const QPoint& pos) override; - virtual bool secondaryEditStartDrag (const QPoint& pos); + bool secondaryEditStartDrag (const QPoint& pos) override; - virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor); + void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) override; - virtual void dragCompleted(const QPoint& pos); + void dragCompleted(const QPoint& pos) override; /// \note dragAborted will not be called, if the drag is aborted via changing /// editing mode - virtual void dragAborted(); + void dragAborted() override; private: diff --git a/apps/opencs/view/render/pathgridselectionmode.hpp b/apps/opencs/view/render/pathgridselectionmode.hpp index e4cb1e0440..19bfca803e 100644 --- a/apps/opencs/view/render/pathgridselectionmode.hpp +++ b/apps/opencs/view/render/pathgridselectionmode.hpp @@ -21,7 +21,7 @@ namespace CSVRender /// /// \return Have there been any menu items to be added (if menu is 0 and there /// items to be added, the function must return true anyway. - bool createContextMenu(QMenu* menu); + bool createContextMenu(QMenu* menu) override; private: diff --git a/apps/opencs/view/render/scenewidget.hpp b/apps/opencs/view/render/scenewidget.hpp index 85b898d048..6a94254b99 100644 --- a/apps/opencs/view/render/scenewidget.hpp +++ b/apps/opencs/view/render/scenewidget.hpp @@ -97,8 +97,8 @@ namespace CSVRender void setAmbient(const osg::Vec4f& ambient); - virtual void mouseMoveEvent (QMouseEvent *event); - virtual void wheelEvent (QWheelEvent *event); + void mouseMoveEvent (QMouseEvent *event) override; + void wheelEvent (QWheelEvent *event) override; std::shared_ptr mResourceSystem; diff --git a/apps/opencs/view/render/selectionmode.hpp b/apps/opencs/view/render/selectionmode.hpp index f28888bfde..95f6de41b4 100644 --- a/apps/opencs/view/render/selectionmode.hpp +++ b/apps/opencs/view/render/selectionmode.hpp @@ -30,7 +30,7 @@ namespace CSVRender /// /// \return Have there been any menu items to be added (if menu is 0 and there /// items to be added, the function must return true anyway. - virtual bool createContextMenu (QMenu* menu); + bool createContextMenu (QMenu* menu) override; private: diff --git a/apps/opencs/view/render/terrainstorage.hpp b/apps/opencs/view/render/terrainstorage.hpp index 74c30ce5c6..21faf9b644 100644 --- a/apps/opencs/view/render/terrainstorage.hpp +++ b/apps/opencs/view/render/terrainstorage.hpp @@ -19,7 +19,7 @@ namespace CSVRender void setAlteredHeight(int inCellX, int inCellY, float heightMap); void resetHeights(); - virtual bool useAlteration() const { return true; } + bool useAlteration() const override { return true; } float getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY); float* getAlteredHeight(int inCellX, int inCellY); diff --git a/apps/opencs/view/render/unpagedworldspacewidget.hpp b/apps/opencs/view/render/unpagedworldspacewidget.hpp index d169220f95..eec1b01f34 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.hpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.hpp @@ -39,71 +39,70 @@ namespace CSVRender UnpagedWorldspaceWidget (const std::string& cellId, CSMDoc::Document& document, QWidget *parent); - virtual dropRequirments getDropRequirements(DropType type) const; + dropRequirments getDropRequirements(DropType type) const override; /// \return Drop handled? - virtual bool handleDrop (const std::vector& data, - DropType type); + bool handleDrop (const std::vector& data, + DropType type) override; /// \param elementMask Elements to be affected by the clear operation - virtual void clearSelection (int elementMask); + void clearSelection (int elementMask) override; /// \param elementMask Elements to be affected by the select operation - virtual void invertSelection (int elementMask); + void invertSelection (int elementMask) override; /// \param elementMask Elements to be affected by the select operation - virtual void selectAll (int elementMask); + void selectAll (int elementMask) override; // Select everything that references the same ID as at least one of the elements // already selected // /// \param elementMask Elements to be affected by the select operation - virtual void selectAllWithSameParentId (int elementMask); + void selectAllWithSameParentId (int elementMask) override; - virtual std::string getCellId (const osg::Vec3f& point) const; + std::string getCellId (const osg::Vec3f& point) const override; - virtual Cell* getCell(const osg::Vec3d& point) const; + Cell* getCell(const osg::Vec3d& point) const override; - virtual Cell* getCell(const CSMWorld::CellCoordinates& coords) const; + Cell* getCell(const CSMWorld::CellCoordinates& coords) const override; - virtual std::vector > getSelection (unsigned int elementMask) - const; + std::vector > getSelection (unsigned int elementMask) + const override; - virtual std::vector > getEdited (unsigned int elementMask) - const; + std::vector > getEdited (unsigned int elementMask) + const override; - virtual void setSubMode (int subMode, unsigned int elementMask); + void setSubMode (int subMode, unsigned int elementMask) override; /// Erase all overrides and restore the visual representation to its true state. - virtual void reset (unsigned int elementMask); + void reset (unsigned int elementMask) override; private: - virtual void referenceableDataChanged (const QModelIndex& topLeft, - const QModelIndex& bottomRight); + void referenceableDataChanged (const QModelIndex& topLeft, + const QModelIndex& bottomRight) override; - virtual void referenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void referenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void referenceableAdded (const QModelIndex& index, int start, int end); + void referenceableAdded (const QModelIndex& index, int start, int end) override; - virtual void referenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight); + void referenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight) override; - virtual void referenceAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void referenceAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void referenceAdded (const QModelIndex& index, int start, int end); + void referenceAdded (const QModelIndex& index, int start, int end) override; - virtual void pathgridDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight); + void pathgridDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight) override; - virtual void pathgridAboutToBeRemoved (const QModelIndex& parent, int start, int end); + void pathgridAboutToBeRemoved (const QModelIndex& parent, int start, int end) override; - virtual void pathgridAdded (const QModelIndex& parent, int start, int end); + void pathgridAdded (const QModelIndex& parent, int start, int end) override; - - virtual std::string getStartupInstruction(); + std::string getStartupInstruction() override; protected: - virtual void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle2 *tool); + void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle2 *tool) override; private slots: diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index a80032b82b..5ed3d01b35 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -203,12 +203,12 @@ namespace CSVRender virtual void updateOverlay(); - virtual void mouseMoveEvent (QMouseEvent *event); - virtual void wheelEvent (QWheelEvent *event); + void mouseMoveEvent (QMouseEvent *event) override; + void wheelEvent (QWheelEvent *event) override; virtual void handleInteractionPress (const WorldspaceHitResult& hit, InteractionType type); - virtual void settingChanged (const CSMPrefs::Setting *setting); + void settingChanged (const CSMPrefs::Setting *setting) override; EditMode *getEditMode(); @@ -216,11 +216,11 @@ namespace CSVRender private: - void dragEnterEvent(QDragEnterEvent *event); + void dragEnterEvent(QDragEnterEvent *event) override; - void dropEvent(QDropEvent* event); + void dropEvent(QDropEvent* event) override; - void dragMoveEvent(QDragMoveEvent *event); + void dragMoveEvent(QDragMoveEvent *event) override; virtual std::string getStartupInstruction() = 0; diff --git a/apps/opencs/view/tools/merge.hpp b/apps/opencs/view/tools/merge.hpp index e332b799f3..c82feba14d 100644 --- a/apps/opencs/view/tools/merge.hpp +++ b/apps/opencs/view/tools/merge.hpp @@ -35,7 +35,7 @@ namespace CSVTools CSVDoc::AdjusterWidget *mAdjuster; CSMDoc::DocumentManager& mDocumentManager; - void keyPressEvent (QKeyEvent *event); + void keyPressEvent (QKeyEvent *event) override; public: diff --git a/apps/opencs/view/tools/reportsubview.hpp b/apps/opencs/view/tools/reportsubview.hpp index 9f43efdac8..6d48690b43 100644 --- a/apps/opencs/view/tools/reportsubview.hpp +++ b/apps/opencs/view/tools/reportsubview.hpp @@ -27,7 +27,7 @@ namespace CSVTools ReportSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; private slots: diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index 426c12f68e..7b28f2b0fd 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -27,8 +27,8 @@ namespace CSVTools RichTextDelegate (QObject *parent = 0); - virtual void paint(QPainter *painter, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + void paint(QPainter *painter, const QStyleOptionViewItem& option, + const QModelIndex& index) const override; }; } diff --git a/apps/opencs/view/tools/reporttable.hpp b/apps/opencs/view/tools/reporttable.hpp index 88936d3c3b..4c169a9862 100644 --- a/apps/opencs/view/tools/reporttable.hpp +++ b/apps/opencs/view/tools/reporttable.hpp @@ -49,11 +49,11 @@ namespace CSVTools private: - void contextMenuEvent (QContextMenuEvent *event); + void contextMenuEvent (QContextMenuEvent *event) override; - void mouseMoveEvent (QMouseEvent *event); + void mouseMoveEvent (QMouseEvent *event) override; - virtual void mouseDoubleClickEvent (QMouseEvent *event); + void mouseDoubleClickEvent (QMouseEvent *event) override; public: @@ -64,7 +64,7 @@ namespace CSVTools ReportTable (CSMDoc::Document& document, const CSMWorld::UniversalId& id, bool richTextDescription, int refreshState = 0, QWidget *parent = 0); - virtual std::vector getDraggedRecords() const; + std::vector getDraggedRecords() const override; void clear(); diff --git a/apps/opencs/view/tools/searchsubview.hpp b/apps/opencs/view/tools/searchsubview.hpp index c0f3eac84c..cbcb01577e 100644 --- a/apps/opencs/view/tools/searchsubview.hpp +++ b/apps/opencs/view/tools/searchsubview.hpp @@ -41,15 +41,15 @@ namespace CSVTools protected: - void showEvent (QShowEvent *event); + void showEvent (QShowEvent *event) override; public: SearchSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void setStatusBar (bool show); + void setStatusBar (bool show) override; private slots: diff --git a/apps/opencs/view/widget/coloreditor.hpp b/apps/opencs/view/widget/coloreditor.hpp index 368896e422..d4a802ca2f 100644 --- a/apps/opencs/view/widget/coloreditor.hpp +++ b/apps/opencs/view/widget/coloreditor.hpp @@ -37,8 +37,8 @@ namespace CSVWidget void setColor(const int colorInt); protected: - virtual void paintEvent(QPaintEvent *event); - virtual void showEvent(QShowEvent *event); + void paintEvent(QPaintEvent *event) override; + void showEvent(QShowEvent *event) override; private: ColorEditor(QWidget *parent = 0, const bool popupOnStart = false); diff --git a/apps/opencs/view/widget/colorpickerpopup.hpp b/apps/opencs/view/widget/colorpickerpopup.hpp index eb5653f469..d653d68fbb 100644 --- a/apps/opencs/view/widget/colorpickerpopup.hpp +++ b/apps/opencs/view/widget/colorpickerpopup.hpp @@ -19,8 +19,8 @@ namespace CSVWidget void showPicker(const QPoint &position, const QColor &initialColor); protected: - virtual void mousePressEvent(QMouseEvent *event); - virtual bool eventFilter(QObject *object, QEvent *event); + void mousePressEvent(QMouseEvent *event) override; + bool eventFilter(QObject *object, QEvent *event) override; signals: void colorChanged(const QColor &color); diff --git a/apps/opencs/view/widget/completerpopup.hpp b/apps/opencs/view/widget/completerpopup.hpp index 6857064b8f..62fdf5388f 100644 --- a/apps/opencs/view/widget/completerpopup.hpp +++ b/apps/opencs/view/widget/completerpopup.hpp @@ -10,7 +10,7 @@ namespace CSVWidget public: CompleterPopup(QWidget *parent = 0); - virtual int sizeHintForRow(int row) const; + int sizeHintForRow(int row) const override; }; } diff --git a/apps/opencs/view/widget/droplineedit.hpp b/apps/opencs/view/widget/droplineedit.hpp index 60832e71bc..ed991af0dd 100644 --- a/apps/opencs/view/widget/droplineedit.hpp +++ b/apps/opencs/view/widget/droplineedit.hpp @@ -29,9 +29,9 @@ namespace CSVWidget DropLineEdit(CSMWorld::ColumnBase::Display type, QWidget *parent = 0); protected: - void dragEnterEvent(QDragEnterEvent *event); - void dragMoveEvent(QDragMoveEvent *event); - void dropEvent(QDropEvent *event); + void dragEnterEvent(QDragEnterEvent *event) override; + void dragMoveEvent(QDragMoveEvent *event) override; + void dropEvent(QDropEvent *event) override; signals: void tableMimeDataDropped(const CSMWorld::UniversalId &id, const CSMDoc::Document *document); diff --git a/apps/opencs/view/widget/pushbutton.hpp b/apps/opencs/view/widget/pushbutton.hpp index bdbdc9c4dd..5522cd74f6 100644 --- a/apps/opencs/view/widget/pushbutton.hpp +++ b/apps/opencs/view/widget/pushbutton.hpp @@ -38,11 +38,11 @@ namespace CSVWidget protected: - virtual void keyPressEvent (QKeyEvent *event); + void keyPressEvent (QKeyEvent *event) override; - virtual void keyReleaseEvent (QKeyEvent *event); + void keyReleaseEvent (QKeyEvent *event) override; - virtual void mouseReleaseEvent (QMouseEvent *event); + void mouseReleaseEvent (QMouseEvent *event) override; public: diff --git a/apps/opencs/view/widget/scenetool.hpp b/apps/opencs/view/widget/scenetool.hpp index cdea88096a..295375f26d 100644 --- a/apps/opencs/view/widget/scenetool.hpp +++ b/apps/opencs/view/widget/scenetool.hpp @@ -24,7 +24,7 @@ namespace CSVWidget protected: - void mouseReleaseEvent (QMouseEvent *event); + void mouseReleaseEvent (QMouseEvent *event) override; private slots: diff --git a/apps/opencs/view/widget/scenetoolbar.hpp b/apps/opencs/view/widget/scenetoolbar.hpp index 8e2c8ab00b..d9998eefc0 100644 --- a/apps/opencs/view/widget/scenetoolbar.hpp +++ b/apps/opencs/view/widget/scenetoolbar.hpp @@ -19,7 +19,7 @@ namespace CSVWidget protected: - virtual void focusInEvent (QFocusEvent *event); + void focusInEvent (QFocusEvent *event) override; public: diff --git a/apps/opencs/view/widget/scenetoolmode.hpp b/apps/opencs/view/widget/scenetoolmode.hpp index 90f1dc4199..896a6d9c66 100644 --- a/apps/opencs/view/widget/scenetoolmode.hpp +++ b/apps/opencs/view/widget/scenetoolmode.hpp @@ -31,7 +31,7 @@ namespace CSVWidget void adjustToolTip (const ModeButton *activeMode); - virtual void contextMenuEvent (QContextMenuEvent *event); + void contextMenuEvent (QContextMenuEvent *event) override; /// Add context menu items to \a menu. Default-implementation: Pass on request to /// current mode button or return false, if there is no current mode button. @@ -46,13 +46,13 @@ namespace CSVWidget protected: - bool event(QEvent* event); + bool event(QEvent* event) override; public: SceneToolMode (SceneToolbar *parent, const QString& toolTip); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; void addButton (const std::string& icon, const std::string& id, const QString& tooltip = ""); diff --git a/apps/opencs/view/widget/scenetoolrun.hpp b/apps/opencs/view/widget/scenetoolrun.hpp index dd035462fe..4a90aa7c06 100644 --- a/apps/opencs/view/widget/scenetoolrun.hpp +++ b/apps/opencs/view/widget/scenetoolrun.hpp @@ -35,9 +35,9 @@ namespace CSVWidget SceneToolRun (SceneToolbar *parent, const QString& toolTip, const QString& icon, const std::vector& profiles); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; - virtual void activate(); + void activate() override; /// \attention This function does not remove the profile from the profile selection /// panel. diff --git a/apps/opencs/view/widget/scenetoolshapebrush.hpp b/apps/opencs/view/widget/scenetoolshapebrush.hpp index 2c027baf02..76c0dfa04e 100644 --- a/apps/opencs/view/widget/scenetoolshapebrush.hpp +++ b/apps/opencs/view/widget/scenetoolshapebrush.hpp @@ -105,18 +105,18 @@ namespace CSVWidget SceneToolShapeBrush (SceneToolbar *parent, const QString& toolTip, CSMDoc::Document& document); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; void updatePanel (); - void dropEvent (QDropEvent *event); - void dragEnterEvent (QDragEnterEvent *event); + void dropEvent (QDropEvent *event) override; + void dragEnterEvent (QDragEnterEvent *event) override; friend class CSVRender::TerrainShapeMode; public slots: void setButtonIcon(CSVWidget::BrushShape brushShape); void clicked (const QModelIndex& index); - virtual void activate(); + void activate() override; signals: void passEvent(QDropEvent *event); diff --git a/apps/opencs/view/widget/scenetooltexturebrush.hpp b/apps/opencs/view/widget/scenetooltexturebrush.hpp index 5f5ccc6b1c..c6f0b5e527 100644 --- a/apps/opencs/view/widget/scenetooltexturebrush.hpp +++ b/apps/opencs/view/widget/scenetooltexturebrush.hpp @@ -112,11 +112,11 @@ namespace CSVWidget SceneToolTextureBrush (SceneToolbar *parent, const QString& toolTip, CSMDoc::Document& document); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; void updatePanel (); - void dropEvent (QDropEvent *event); - void dragEnterEvent (QDragEnterEvent *event); + void dropEvent (QDropEvent *event) override; + void dragEnterEvent (QDragEnterEvent *event) override; friend class CSVRender::TerrainTextureMode; @@ -124,7 +124,7 @@ namespace CSVWidget void setButtonIcon(CSVWidget::BrushShape brushShape); void updateBrushHistory (const std::string& mBrushTexture); void clicked (const QModelIndex& index); - virtual void activate(); + void activate() override; signals: void passEvent(QDropEvent *event); diff --git a/apps/opencs/view/widget/scenetooltoggle.hpp b/apps/opencs/view/widget/scenetooltoggle.hpp index 68cd2362e6..f08d117fb2 100644 --- a/apps/opencs/view/widget/scenetooltoggle.hpp +++ b/apps/opencs/view/widget/scenetooltoggle.hpp @@ -46,7 +46,7 @@ namespace CSVWidget SceneToolToggle (SceneToolbar *parent, const QString& toolTip, const std::string& emptyIcon); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; /// \attention After the last button has been added, setSelection must be called at /// least once to finalise the layout. diff --git a/apps/opencs/view/widget/scenetooltoggle2.hpp b/apps/opencs/view/widget/scenetooltoggle2.hpp index 50337ac117..e250192984 100644 --- a/apps/opencs/view/widget/scenetooltoggle2.hpp +++ b/apps/opencs/view/widget/scenetooltoggle2.hpp @@ -52,7 +52,7 @@ namespace CSVWidget SceneToolToggle2 (SceneToolbar *parent, const QString& toolTip, const std::string& compositeIcon, const std::string& singleIcon); - virtual void showPanel (const QPoint& position); + void showPanel (const QPoint& position) override; /// \param buttonId used to compose the icon filename /// \param mask used for the reported getSelectionMask() / setSelectionMask() diff --git a/apps/opencs/view/world/bodypartcreator.hpp b/apps/opencs/view/world/bodypartcreator.hpp index 3c27136dd1..f526b7faeb 100644 --- a/apps/opencs/view/world/bodypartcreator.hpp +++ b/apps/opencs/view/world/bodypartcreator.hpp @@ -23,7 +23,7 @@ namespace CSVWorld private: /// \return ID entered by user. - virtual std::string getId() const; + std::string getId() const override; public: @@ -33,10 +33,10 @@ namespace CSVWorld const CSMWorld::UniversalId& id); /// \return Error description for current user input. - virtual std::string getErrors() const; + std::string getErrors() const override; /// \brief Clear ID and checkbox input widgets. - virtual void reset(); + void reset() override; private slots: diff --git a/apps/opencs/view/world/cellcreator.hpp b/apps/opencs/view/world/cellcreator.hpp index 6c682c6cd4..032096aa24 100644 --- a/apps/opencs/view/world/cellcreator.hpp +++ b/apps/opencs/view/world/cellcreator.hpp @@ -21,21 +21,21 @@ namespace CSVWorld protected: - virtual std::string getId() const; + std::string getId() const override; /// Allow subclasses to add additional data to \a command. - virtual void configureCreateCommand(CSMWorld::CreateCommand& command) const; + void configureCreateCommand(CSMWorld::CreateCommand& command) const override; public: CellCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id); - virtual void reset(); + void reset() override; - virtual void cloneMode(const std::string& originId, - const CSMWorld::UniversalId::Type type); + void cloneMode(const std::string& originId, + const CSMWorld::UniversalId::Type type) override; - virtual std::string getErrors() const; + std::string getErrors() const override; ///< Return formatted error descriptions for the current state of the creator. if an empty /// string is returned, there is no error. diff --git a/apps/opencs/view/world/colordelegate.hpp b/apps/opencs/view/world/colordelegate.hpp index 87051e86d8..041051d132 100644 --- a/apps/opencs/view/world/colordelegate.hpp +++ b/apps/opencs/view/world/colordelegate.hpp @@ -19,17 +19,17 @@ namespace CSVWorld CSMDoc::Document& document, QObject *parent); - virtual void paint(QPainter *painter, + void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const; + const QModelIndex &index) const override; }; class ColorDelegateFactory : public CommandDelegateFactory { public: - virtual CommandDelegate *makeDelegate(CSMWorld::CommandDispatcher *dispatcher, + CommandDelegate *makeDelegate(CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document &document, - QObject *parent) const; + QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. }; } diff --git a/apps/opencs/view/world/creator.hpp b/apps/opencs/view/world/creator.hpp index f50333e4e4..516f71f15c 100644 --- a/apps/opencs/view/world/creator.hpp +++ b/apps/opencs/view/world/creator.hpp @@ -74,7 +74,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. /// /// \note The function always returns 0. @@ -85,7 +85,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. /// /// \note The function can return a 0-pointer, which means no UI for creating/deleting diff --git a/apps/opencs/view/world/datadisplaydelegate.hpp b/apps/opencs/view/world/datadisplaydelegate.hpp index f8e7753699..df06359a04 100755 --- a/apps/opencs/view/world/datadisplaydelegate.hpp +++ b/apps/opencs/view/world/datadisplaydelegate.hpp @@ -53,9 +53,9 @@ namespace CSVWorld ~DataDisplayDelegate(); - virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; /// pass a QSize defining height / width of icon. Default is QSize (16,16). void setIconSize (const QSize& icon); @@ -74,7 +74,7 @@ namespace CSVWorld /// rebuild the list of pixmaps from the provided icons (called when icon size is changed) void buildPixmaps(); - virtual void settingChanged (const CSMPrefs::Setting *setting); + void settingChanged (const CSMPrefs::Setting *setting) override; }; class DataDisplayDelegateFactory : public EnumDelegateFactory @@ -85,7 +85,7 @@ namespace CSVWorld public: - virtual CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const; + CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. protected: diff --git a/apps/opencs/view/world/dialoguecreator.hpp b/apps/opencs/view/world/dialoguecreator.hpp index 20430fdb6e..0aef2f84df 100644 --- a/apps/opencs/view/world/dialoguecreator.hpp +++ b/apps/opencs/view/world/dialoguecreator.hpp @@ -11,7 +11,7 @@ namespace CSVWorld protected: - virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const; + void configureCreateCommand (CSMWorld::CreateCommand& command) const override; public: @@ -23,7 +23,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. }; @@ -31,7 +31,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. }; } diff --git a/apps/opencs/view/world/dialoguespinbox.hpp b/apps/opencs/view/world/dialoguespinbox.hpp index a68e0c3148..b7c4889a50 100644 --- a/apps/opencs/view/world/dialoguespinbox.hpp +++ b/apps/opencs/view/world/dialoguespinbox.hpp @@ -16,9 +16,9 @@ namespace CSVWorld protected: - virtual void focusInEvent(QFocusEvent *event); - virtual void focusOutEvent(QFocusEvent *event); - virtual void wheelEvent(QWheelEvent *event); + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + void wheelEvent(QWheelEvent *event) override; }; class DialogueDoubleSpinBox : public QDoubleSpinBox @@ -31,9 +31,9 @@ namespace CSVWorld protected: - virtual void focusInEvent(QFocusEvent *event); - virtual void focusOutEvent(QFocusEvent *event); - virtual void wheelEvent(QWheelEvent *event); + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + void wheelEvent(QWheelEvent *event) override; }; } diff --git a/apps/opencs/view/world/dialoguesubview.hpp b/apps/opencs/view/world/dialoguesubview.hpp index 52d3d8da5d..eb14efa8e5 100644 --- a/apps/opencs/view/world/dialoguesubview.hpp +++ b/apps/opencs/view/world/dialoguesubview.hpp @@ -52,22 +52,22 @@ namespace CSVWorld NotEditableSubDelegate(const CSMWorld::IdTable* table, QObject * parent = 0); - virtual void setEditorData (QWidget* editor, const QModelIndex& index) const; + void setEditorData (QWidget* editor, const QModelIndex& index) const override; - virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override; - virtual void paint (QPainter* painter, + void paint (QPainter* painter, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + const QModelIndex& index) const override; ///< does nothing - virtual QSize sizeHint (const QStyleOptionViewItem& option, - const QModelIndex& index) const; + QSize sizeHint (const QStyleOptionViewItem& option, + const QModelIndex& index) const override; ///< does nothing - virtual QWidget *createEditor (QWidget *parent, + QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + const QModelIndex& index) const override; }; //this can't be nested into the DialogueDelegateDispatcher, because it needs to emit signals @@ -136,22 +136,22 @@ namespace CSVWorld ///< will return null if delegate is not present, parent of the widget is //same as for dispatcher itself - virtual void setEditorData (QWidget* editor, const QModelIndex& index) const; + void setEditorData (QWidget* editor, const QModelIndex& index) const override; - virtual void setModelData (QWidget* editor, QAbstractItemModel* model, - const QModelIndex& index) const; + void setModelData (QWidget* editor, QAbstractItemModel* model, + const QModelIndex& index) const override; virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const; - virtual void paint (QPainter* painter, + void paint (QPainter* painter, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + const QModelIndex& index) const override; ///< does nothing - virtual QSize sizeHint (const QStyleOptionViewItem& option, - const QModelIndex& index) const; + QSize sizeHint (const QStyleOptionViewItem& option, + const QModelIndex& index) const override; ///< does nothing private slots: @@ -248,7 +248,7 @@ namespace CSVWorld SimpleDialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; private slots: @@ -276,7 +276,7 @@ namespace CSVWorld DialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document, const CreatorFactoryBase& creatorFactory, bool sorting = false); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; private slots: diff --git a/apps/opencs/view/world/dragrecordtable.hpp b/apps/opencs/view/world/dragrecordtable.hpp index 9e29b61451..a6b6756aa0 100644 --- a/apps/opencs/view/world/dragrecordtable.hpp +++ b/apps/opencs/view/world/dragrecordtable.hpp @@ -37,11 +37,11 @@ namespace CSVWorld protected: void startDragFromTable(const DragRecordTable& table); - void dragEnterEvent(QDragEnterEvent *event); + void dragEnterEvent(QDragEnterEvent *event) override; - void dragMoveEvent(QDragMoveEvent *event); + void dragMoveEvent(QDragMoveEvent *event) override; - void dropEvent(QDropEvent *event); + void dropEvent(QDropEvent *event) override; private: CSMWorld::ColumnBase::Display getIndexDisplayType(const QModelIndex &index) const; diff --git a/apps/opencs/view/world/enumdelegate.hpp b/apps/opencs/view/world/enumdelegate.hpp index bd20943d96..91326e2c05 100644 --- a/apps/opencs/view/world/enumdelegate.hpp +++ b/apps/opencs/view/world/enumdelegate.hpp @@ -23,8 +23,8 @@ namespace CSVWorld private: - virtual void setModelDataImp (QWidget *editor, QAbstractItemModel *model, - const QModelIndex& index) const; + void setModelDataImp (QWidget *editor, QAbstractItemModel *model, + const QModelIndex& index) const override; virtual void addCommands (QAbstractItemModel *model, const QModelIndex& index, int type) const; @@ -34,21 +34,21 @@ namespace CSVWorld EnumDelegate (const std::vector >& values, CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent); - virtual QWidget *createEditor(QWidget *parent, + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + const QModelIndex& index) const override; - virtual QWidget *createEditor(QWidget *parent, + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem& option, const QModelIndex& index, - CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const; + CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const override; - virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay = false) const; + void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay = false) const override; - virtual void paint (QPainter *painter, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + void paint (QPainter *painter, const QStyleOptionViewItem& option, + const QModelIndex& index) const override; - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; }; @@ -68,7 +68,7 @@ namespace CSVWorld EnumDelegateFactory (const std::vector>& names, bool allowNone = false); /// \param allowNone Use value of -1 for "none selected" (empty string) - virtual CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const; + CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. void add (int value, const QString& name); diff --git a/apps/opencs/view/world/extendedcommandconfigurator.hpp b/apps/opencs/view/world/extendedcommandconfigurator.hpp index 641b4a5241..42573924a8 100644 --- a/apps/opencs/view/world/extendedcommandconfigurator.hpp +++ b/apps/opencs/view/world/extendedcommandconfigurator.hpp @@ -63,7 +63,7 @@ namespace CSVWorld void setEditLock(bool locked); protected: - virtual void resizeEvent(QResizeEvent *event); + void resizeEvent(QResizeEvent *event) override; private slots: void performExtendedCommand(); diff --git a/apps/opencs/view/world/genericcreator.hpp b/apps/opencs/view/world/genericcreator.hpp index 3baacfc06e..3e2a43c918 100644 --- a/apps/opencs/view/world/genericcreator.hpp +++ b/apps/opencs/view/world/genericcreator.hpp @@ -96,25 +96,25 @@ namespace CSVWorld GenericCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id, bool relaxedIdRules = false); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void reset(); + void reset() override; - virtual void toggleWidgets (bool active = true); + void toggleWidgets (bool active = true) override; - virtual void cloneMode(const std::string& originId, - const CSMWorld::UniversalId::Type type); + void cloneMode(const std::string& originId, + const CSMWorld::UniversalId::Type type) override; - virtual void touch(const std::vector& ids); + void touch(const std::vector& ids) override; virtual std::string getErrors() const; ///< Return formatted error descriptions for the current state of the creator. if an empty /// string is returned, there is no error. - virtual void setScope (unsigned int scope); + void setScope (unsigned int scope) override; /// Focus main input widget - virtual void focus(); + void focus() override; private slots: diff --git a/apps/opencs/view/world/globalcreator.hpp b/apps/opencs/view/world/globalcreator.hpp index 8c6cc628c0..057798a4c2 100644 --- a/apps/opencs/view/world/globalcreator.hpp +++ b/apps/opencs/view/world/globalcreator.hpp @@ -15,7 +15,7 @@ namespace CSVWorld protected: - virtual void configureCreateCommand(CSMWorld::CreateCommand& command) const; + void configureCreateCommand(CSMWorld::CreateCommand& command) const override; }; } diff --git a/apps/opencs/view/world/idcompletiondelegate.hpp b/apps/opencs/view/world/idcompletiondelegate.hpp index d2ac6874f6..57c2c11c43 100644 --- a/apps/opencs/view/world/idcompletiondelegate.hpp +++ b/apps/opencs/view/world/idcompletiondelegate.hpp @@ -13,22 +13,22 @@ namespace CSVWorld CSMDoc::Document& document, QObject *parent); - virtual QWidget *createEditor (QWidget *parent, + QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const; + const QModelIndex &index) const override; - virtual QWidget *createEditor (QWidget *parent, + QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index, - CSMWorld::ColumnBase::Display display) const; + CSMWorld::ColumnBase::Display display) const override; }; class IdCompletionDelegateFactory : public CommandDelegateFactory { public: - virtual CommandDelegate *makeDelegate(CSMWorld::CommandDispatcher *dispatcher, + CommandDelegate *makeDelegate(CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, - QObject *parent) const; + QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. }; } diff --git a/apps/opencs/view/world/idtypedelegate.hpp b/apps/opencs/view/world/idtypedelegate.hpp index d0ed6997b4..f1c3b539c9 100755 --- a/apps/opencs/view/world/idtypedelegate.hpp +++ b/apps/opencs/view/world/idtypedelegate.hpp @@ -20,7 +20,7 @@ namespace CSVWorld IdTypeDelegateFactory(); - virtual CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const; + CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. }; } diff --git a/apps/opencs/view/world/idvalidator.hpp b/apps/opencs/view/world/idvalidator.hpp index a9df9580ab..17624a243b 100644 --- a/apps/opencs/view/world/idvalidator.hpp +++ b/apps/opencs/view/world/idvalidator.hpp @@ -22,7 +22,7 @@ namespace CSVWorld IdValidator (bool relaxed = false, QObject *parent = 0); ///< \param relaxed Relaxed rules for IDs that also functino as user visible text - virtual State validate (QString& input, int& pos) const; + State validate (QString& input, int& pos) const override; void setNamespace (const std::string& namespace_); diff --git a/apps/opencs/view/world/infocreator.hpp b/apps/opencs/view/world/infocreator.hpp index d131e3fac5..404dcf3727 100644 --- a/apps/opencs/view/world/infocreator.hpp +++ b/apps/opencs/view/world/infocreator.hpp @@ -22,26 +22,26 @@ namespace CSVWorld CSVWidget::DropLineEdit *mTopic; - virtual std::string getId() const; + std::string getId() const override; - virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const; + void configureCreateCommand (CSMWorld::CreateCommand& command) const override; public: InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id, CSMWorld::IdCompletionManager& completionManager); - virtual void cloneMode (const std::string& originId, - const CSMWorld::UniversalId::Type type); + void cloneMode (const std::string& originId, + const CSMWorld::UniversalId::Type type) override; - virtual void reset(); + void reset() override; - virtual std::string getErrors() const; + std::string getErrors() const override; ///< Return formatted error descriptions for the current state of the creator. if an empty /// string is returned, there is no error. /// Focus main input widget - virtual void focus(); + void focus() override; private slots: @@ -52,7 +52,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. }; } diff --git a/apps/opencs/view/world/nestedtable.hpp b/apps/opencs/view/world/nestedtable.hpp index b39c7e560a..f864f5d80c 100644 --- a/apps/opencs/view/world/nestedtable.hpp +++ b/apps/opencs/view/world/nestedtable.hpp @@ -42,10 +42,10 @@ namespace CSVWorld bool editable = true, bool fixedRows = false); - virtual std::vector getDraggedRecords() const; + std::vector getDraggedRecords() const override; private: - void contextMenuEvent (QContextMenuEvent *event); + void contextMenuEvent (QContextMenuEvent *event) override; private slots: void removeRowActionTriggered(); diff --git a/apps/opencs/view/world/pathgridcreator.hpp b/apps/opencs/view/world/pathgridcreator.hpp index 7e82155f67..773735e25c 100644 --- a/apps/opencs/view/world/pathgridcreator.hpp +++ b/apps/opencs/view/world/pathgridcreator.hpp @@ -33,7 +33,7 @@ namespace CSVWorld private: /// \return Cell ID entered by user. - virtual std::string getId() const; + std::string getId() const override; /// \return reference to table containing pathgrids. CSMWorld::IdTable& getPathgridsTable() const; @@ -49,18 +49,18 @@ namespace CSVWorld /// \brief Set cell ID input widget to ID of record to be cloned. /// \param originId Cell ID to be cloned. /// \param type Type of record to be cloned. - virtual void cloneMode( + void cloneMode( const std::string& originId, - const CSMWorld::UniversalId::Type type); + const CSMWorld::UniversalId::Type type) override; /// \return Error description for current user input. - virtual std::string getErrors() const; + std::string getErrors() const override; /// \brief Set focus to cell ID input widget. - virtual void focus(); + void focus() override; /// \brief Clear cell ID input widget. - virtual void reset(); + void reset() override; private slots: @@ -73,9 +73,9 @@ namespace CSVWorld { public: - virtual Creator *makeCreator( + Creator *makeCreator( CSMDoc::Document& document, - const CSMWorld::UniversalId& id) const; + const CSMWorld::UniversalId& id) const override; }; } diff --git a/apps/opencs/view/world/previewsubview.hpp b/apps/opencs/view/world/previewsubview.hpp index a28be5c36d..ed88d04887 100644 --- a/apps/opencs/view/world/previewsubview.hpp +++ b/apps/opencs/view/world/previewsubview.hpp @@ -26,9 +26,9 @@ namespace CSVWorld PreviewSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual std::string getTitle() const; + std::string getTitle() const override; private slots: diff --git a/apps/opencs/view/world/recordstatusdelegate.hpp b/apps/opencs/view/world/recordstatusdelegate.hpp index acaf872a63..6ec8c37bd8 100644 --- a/apps/opencs/view/world/recordstatusdelegate.hpp +++ b/apps/opencs/view/world/recordstatusdelegate.hpp @@ -28,7 +28,7 @@ namespace CSVWorld RecordStatusDelegateFactory(); - virtual CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const; + CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, CSMDoc::Document& document, QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. }; diff --git a/apps/opencs/view/world/referenceablecreator.hpp b/apps/opencs/view/world/referenceablecreator.hpp index 14ad24b292..d4657bcf7f 100644 --- a/apps/opencs/view/world/referenceablecreator.hpp +++ b/apps/opencs/view/world/referenceablecreator.hpp @@ -15,19 +15,19 @@ namespace CSVWorld private: - virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const; + void configureCreateCommand (CSMWorld::CreateCommand& command) const override; public: ReferenceableCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id); - virtual void reset(); + void reset() override; - virtual void cloneMode (const std::string& originId, - const CSMWorld::UniversalId::Type type); + void cloneMode (const std::string& originId, + const CSMWorld::UniversalId::Type type) override; - virtual void toggleWidgets(bool active = true); + void toggleWidgets(bool active = true) override; }; } diff --git a/apps/opencs/view/world/referencecreator.hpp b/apps/opencs/view/world/referencecreator.hpp index 31010fa24a..3903900ad2 100644 --- a/apps/opencs/view/world/referencecreator.hpp +++ b/apps/opencs/view/world/referencecreator.hpp @@ -25,26 +25,26 @@ namespace CSVWorld private: - virtual std::string getId() const; + std::string getId() const override; - virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const; + void configureCreateCommand (CSMWorld::CreateCommand& command) const override; public: ReferenceCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id, CSMWorld::IdCompletionManager &completionManager); - virtual void cloneMode(const std::string& originId, - const CSMWorld::UniversalId::Type type); + void cloneMode(const std::string& originId, + const CSMWorld::UniversalId::Type type) override; - virtual void reset(); + void reset() override; - virtual std::string getErrors() const; + std::string getErrors() const override; ///< Return formatted error descriptions for the current state of the creator. if an empty /// string is returned, there is no error. /// Focus main input widget - virtual void focus(); + void focus() override; private slots: @@ -55,7 +55,7 @@ namespace CSVWorld { public: - virtual Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const; + Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override; ///< The ownership of the returned Creator is transferred to the caller. }; } diff --git a/apps/opencs/view/world/regionmap.hpp b/apps/opencs/view/world/regionmap.hpp index ba773224f7..b1f7cdc674 100644 --- a/apps/opencs/view/world/regionmap.hpp +++ b/apps/opencs/view/world/regionmap.hpp @@ -39,7 +39,7 @@ namespace CSVWorld private: - void contextMenuEvent (QContextMenuEvent *event); + void contextMenuEvent (QContextMenuEvent *event) override; QModelIndexList getUnselectedCells() const; ///< \note Non-existent cells are not listed. @@ -54,16 +54,16 @@ namespace CSVWorld void setRegion (const std::string& regionId); ///< Set region Id of selected cells. - void mouseMoveEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event) override; - void dropEvent(QDropEvent* event); + void dropEvent(QDropEvent* event) override; public: RegionMap (const CSMWorld::UniversalId& universalId, CSMDoc::Document& document, QWidget *parent = 0); - virtual std::vector getDraggedRecords() const; + std::vector getDraggedRecords() const override; signals: @@ -71,7 +71,7 @@ namespace CSVWorld private slots: - void selectAll(); + void selectAll() override; void clearSelection(); diff --git a/apps/opencs/view/world/regionmapsubview.hpp b/apps/opencs/view/world/regionmapsubview.hpp index 5247279017..232d88fc64 100644 --- a/apps/opencs/view/world/regionmapsubview.hpp +++ b/apps/opencs/view/world/regionmapsubview.hpp @@ -24,7 +24,7 @@ namespace CSVWorld RegionMapSubView (CSMWorld::UniversalId universalId, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; private slots: diff --git a/apps/opencs/view/world/scenesubview.hpp b/apps/opencs/view/world/scenesubview.hpp index 85f7d09257..aabb7ca2a7 100644 --- a/apps/opencs/view/world/scenesubview.hpp +++ b/apps/opencs/view/world/scenesubview.hpp @@ -51,13 +51,13 @@ namespace CSVWorld SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void setStatusBar (bool show); + void setStatusBar (bool show) override; - virtual void useHint (const std::string& hint); + void useHint (const std::string& hint) override; - virtual std::string getTitle() const; + std::string getTitle() const override; private: diff --git a/apps/opencs/view/world/scriptedit.hpp b/apps/opencs/view/world/scriptedit.hpp index b0a4b05777..21fabee587 100644 --- a/apps/opencs/view/world/scriptedit.hpp +++ b/apps/opencs/view/world/scriptedit.hpp @@ -61,7 +61,7 @@ namespace CSVWorld protected: - bool event (QEvent *event); + bool event (QEvent *event) override; public: @@ -79,9 +79,9 @@ namespace CSVWorld protected: - virtual void resizeEvent(QResizeEvent *e); + void resizeEvent(QResizeEvent *e) override; - virtual void contextMenuEvent(QContextMenuEvent *event); + void contextMenuEvent(QContextMenuEvent *event) override; private: @@ -89,11 +89,11 @@ namespace CSVWorld const CSMDoc::Document& mDocument; const QRegExp mWhiteListQoutes; - void dragEnterEvent (QDragEnterEvent* event); + void dragEnterEvent (QDragEnterEvent* event) override; - void dropEvent (QDropEvent* event); + void dropEvent (QDropEvent* event) override; - void dragMoveEvent (QDragMoveEvent* event); + void dragMoveEvent (QDragMoveEvent* event) override; bool stringNeedsQuote(const std::string& id) const; @@ -133,11 +133,11 @@ namespace CSVWorld public: LineNumberArea(ScriptEdit *editor); - QSize sizeHint() const; + QSize sizeHint() const override; protected: - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) override; }; } #endif // SCRIPTEDIT_H diff --git a/apps/opencs/view/world/scripterrortable.hpp b/apps/opencs/view/world/scripterrortable.hpp index 4841aac5b3..ad287707dd 100644 --- a/apps/opencs/view/world/scripterrortable.hpp +++ b/apps/opencs/view/world/scripterrortable.hpp @@ -28,10 +28,10 @@ namespace CSVWorld Compiler::Extensions mExtensions; CSMWorld::ScriptContext mContext; - virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type); + void report (const std::string& message, const Compiler::TokenLoc& loc, Type type) override; ///< Report error to the user. - virtual void report (const std::string& message, Type type); + void report (const std::string& message, Type type) override; ///< Report a file related error void addMessage (const std::string& message, CSMDoc::Message::Severity severity, diff --git a/apps/opencs/view/world/scripthighlighter.hpp b/apps/opencs/view/world/scripthighlighter.hpp index a7d0fc2a19..9b4a5b7be0 100644 --- a/apps/opencs/view/world/scripthighlighter.hpp +++ b/apps/opencs/view/world/scripthighlighter.hpp @@ -54,37 +54,37 @@ namespace CSVWorld private: - virtual bool parseInt (int value, const Compiler::TokenLoc& loc, - Compiler::Scanner& scanner); + bool parseInt (int value, const Compiler::TokenLoc& loc, + Compiler::Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const Compiler::TokenLoc& loc, - Compiler::Scanner& scanner); + bool parseFloat (float value, const Compiler::TokenLoc& loc, + Compiler::Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, - const Compiler::TokenLoc& loc, Compiler::Scanner& scanner); + bool parseName (const std::string& name, + const Compiler::TokenLoc& loc, Compiler::Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const Compiler::TokenLoc& loc, - Compiler::Scanner& scanner); + bool parseKeyword (int keyword, const Compiler::TokenLoc& loc, + Compiler::Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const Compiler::TokenLoc& loc, - Compiler::Scanner& scanner); + bool parseSpecial (int code, const Compiler::TokenLoc& loc, + Compiler::Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - virtual bool parseComment (const std::string& comment, const Compiler::TokenLoc& loc, - Compiler::Scanner& scanner); + bool parseComment (const std::string& comment, const Compiler::TokenLoc& loc, + Compiler::Scanner& scanner) override; ///< Handle comment token. /// \return fetch another token? - virtual void parseEOF (Compiler::Scanner& scanner); + void parseEOF (Compiler::Scanner& scanner) override; ///< Handle EOF token. void highlight (const Compiler::TokenLoc& loc, Type type); @@ -93,7 +93,7 @@ namespace CSVWorld ScriptHighlighter (const CSMWorld::Data& data, Mode mode, QTextDocument *parent); - virtual void highlightBlock (const QString& text); + void highlightBlock (const QString& text) override; void setMarkOccurrences(bool); diff --git a/apps/opencs/view/world/scriptsubview.hpp b/apps/opencs/view/world/scriptsubview.hpp index c1016babf9..dc352cc5b0 100644 --- a/apps/opencs/view/world/scriptsubview.hpp +++ b/apps/opencs/view/world/scriptsubview.hpp @@ -70,11 +70,11 @@ namespace CSVWorld ScriptSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void useHint (const std::string& hint); + void useHint (const std::string& hint) override; - virtual void setStatusBar (bool show); + void setStatusBar (bool show) override; public slots: diff --git a/apps/opencs/view/world/startscriptcreator.hpp b/apps/opencs/view/world/startscriptcreator.hpp index 72eb67bccd..cb7f3f619c 100644 --- a/apps/opencs/view/world/startscriptcreator.hpp +++ b/apps/opencs/view/world/startscriptcreator.hpp @@ -26,7 +26,7 @@ namespace CSVWorld private: /// \return script ID entered by user. - virtual std::string getId() const; + std::string getId() const override; /// \return reference to table containing start scripts. CSMWorld::IdTable& getStartScriptsTable() const; @@ -42,18 +42,18 @@ namespace CSVWorld /// \brief Set script ID input widget to ID of record to be cloned. /// \param originId Script ID to be cloned. /// \param type Type of record to be cloned. - virtual void cloneMode( + void cloneMode( const std::string& originId, - const CSMWorld::UniversalId::Type type); + const CSMWorld::UniversalId::Type type) override; /// \return Error description for current user input. - virtual std::string getErrors() const; + std::string getErrors() const override; /// \brief Set focus to script ID input widget. - virtual void focus(); + void focus() override; /// \brief Clear script ID input widget. - virtual void reset(); + void reset() override; private slots: @@ -66,9 +66,9 @@ namespace CSVWorld { public: - virtual Creator *makeCreator( + Creator *makeCreator( CSMDoc::Document& document, - const CSMWorld::UniversalId& id) const; + const CSMWorld::UniversalId& id) const override; }; } diff --git a/apps/opencs/view/world/table.hpp b/apps/opencs/view/world/table.hpp index 36c423b333..61dd57c061 100644 --- a/apps/opencs/view/world/table.hpp +++ b/apps/opencs/view/world/table.hpp @@ -77,13 +77,13 @@ namespace CSVWorld private: - void contextMenuEvent (QContextMenuEvent *event); + void contextMenuEvent (QContextMenuEvent *event) override; - void mouseMoveEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event) override; protected: - virtual void mouseDoubleClickEvent (QMouseEvent *event); + void mouseDoubleClickEvent (QMouseEvent *event) override; public: @@ -100,7 +100,7 @@ namespace CSVWorld std::vector getSelectedIds() const; - virtual std::vector getDraggedRecords() const; + std::vector getDraggedRecords() const override; signals: diff --git a/apps/opencs/view/world/tablebottombox.hpp b/apps/opencs/view/world/tablebottombox.hpp index baa68087b1..50d61150f3 100644 --- a/apps/opencs/view/world/tablebottombox.hpp +++ b/apps/opencs/view/world/tablebottombox.hpp @@ -63,7 +63,7 @@ namespace CSVWorld virtual ~TableBottomBox(); - virtual bool eventFilter(QObject *object, QEvent *event); + bool eventFilter(QObject *object, QEvent *event) override; void setEditLock (bool locked); diff --git a/apps/opencs/view/world/tablesubview.hpp b/apps/opencs/view/world/tablesubview.hpp index 1adf862d5b..337d2c7621 100644 --- a/apps/opencs/view/world/tablesubview.hpp +++ b/apps/opencs/view/world/tablesubview.hpp @@ -41,14 +41,14 @@ namespace CSVWorld TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document, const CreatorFactoryBase& creatorFactory, bool sorting); - virtual void setEditLock (bool locked); + void setEditLock (bool locked) override; - virtual void setStatusBar (bool show); + void setStatusBar (bool show) override; - virtual void useHint (const std::string& hint); + void useHint (const std::string& hint) override; protected: - bool eventFilter(QObject* object, QEvent *event); + bool eventFilter(QObject* object, QEvent *event) override; signals: void cloneRequest(const std::string&, diff --git a/apps/opencs/view/world/util.hpp b/apps/opencs/view/world/util.hpp index ebd5c0ad7a..2c4537dac9 100644 --- a/apps/opencs/view/world/util.hpp +++ b/apps/opencs/view/world/util.hpp @@ -40,13 +40,13 @@ namespace CSVWorld NastyTableModelHack (QAbstractItemModel& model); - int rowCount (const QModelIndex & parent = QModelIndex()) const; + int rowCount (const QModelIndex & parent = QModelIndex()) const override; - int columnCount (const QModelIndex & parent = QModelIndex()) const; + int columnCount (const QModelIndex & parent = QModelIndex()) const override; - QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const; + QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; - bool setData (const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + bool setData (const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; QVariant getData() const; }; @@ -124,12 +124,12 @@ namespace CSVWorld /// cells, a 0-pointer can be passed here. CommandDelegate (CSMWorld::CommandDispatcher *commandDispatcher, CSMDoc::Document& document, QObject *parent); - virtual void setModelData (QWidget *editor, QAbstractItemModel *model, - const QModelIndex& index) const; + void setModelData (QWidget *editor, QAbstractItemModel *model, + const QModelIndex& index) const override; - virtual QWidget *createEditor (QWidget *parent, + QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem& option, - const QModelIndex& index) const; + const QModelIndex& index) const override; virtual QWidget *createEditor (QWidget *parent, const QStyleOptionViewItem& option, @@ -142,7 +142,7 @@ namespace CSVWorld ///< \return Does column require update? - virtual void setEditorData (QWidget *editor, const QModelIndex& index) const; + void setEditorData (QWidget *editor, const QModelIndex& index) const override; virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const; diff --git a/apps/opencs/view/world/vartypedelegate.hpp b/apps/opencs/view/world/vartypedelegate.hpp index a8f39c318d..44705e80ec 100644 --- a/apps/opencs/view/world/vartypedelegate.hpp +++ b/apps/opencs/view/world/vartypedelegate.hpp @@ -11,8 +11,8 @@ namespace CSVWorld { private: - virtual void addCommands (QAbstractItemModel *model, - const QModelIndex& index, int type) const; + void addCommands (QAbstractItemModel *model, + const QModelIndex& index, int type) const override; public: @@ -30,8 +30,8 @@ namespace CSVWorld ESM::VarType type1 = ESM::VT_Unknown, ESM::VarType type2 = ESM::VT_Unknown, ESM::VarType type3 = ESM::VT_Unknown); - virtual CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, - CSMDoc::Document& document, QObject *parent) const; + CommandDelegate *makeDelegate (CSMWorld::CommandDispatcher *dispatcher, + CSMDoc::Document& document, QObject *parent) const override; ///< The ownership of the returned CommandDelegate is transferred to the caller. void add (ESM::VarType type); diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 012ab8f59e..49a4b40590 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -774,7 +774,7 @@ public: { } - virtual void operator()(const osg::Image& image, const unsigned int context_id) + void operator()(const osg::Image& image, const unsigned int context_id) override { // Count screenshots. int shotCount = 0; diff --git a/apps/openmw/mwbase/windowmanager.hpp b/apps/openmw/mwbase/windowmanager.hpp index 1d59015d37..29d404777c 100644 --- a/apps/openmw/mwbase/windowmanager.hpp +++ b/apps/openmw/mwbase/windowmanager.hpp @@ -341,9 +341,9 @@ namespace MWBase virtual bool injectKeyPress(MyGUI::KeyCode key, unsigned int text, bool repeat) = 0; virtual bool injectKeyRelease(MyGUI::KeyCode key) = 0; - virtual void windowVisibilityChange(bool visible) = 0; - virtual void windowResized(int x, int y) = 0; - virtual void windowClosed() = 0; + void windowVisibilityChange(bool visible) override = 0; + void windowResized(int x, int y) override = 0; + void windowClosed() override = 0; virtual bool isWindowVisible() = 0; virtual void watchActor(const MWWorld::Ptr& ptr) = 0; diff --git a/apps/openmw/mwclass/activator.hpp b/apps/openmw/mwclass/activator.hpp index d5175b739c..10ace6f74d 100644 --- a/apps/openmw/mwclass/activator.hpp +++ b/apps/openmw/mwclass/activator.hpp @@ -8,45 +8,45 @@ namespace MWClass class Activator : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; static int getSndGenTypeFromName(const std::string &name); public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) - virtual bool allowTelekinesis(const MWWorld::ConstPtr& ptr) const; + bool allowTelekinesis(const MWWorld::ConstPtr& ptr) const override; ///< Return whether this class of object can be activated with telekinesis - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const override; ///< Generate action for activation static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool useAnim() const; + bool useAnim() const override; ///< Whether or not to use animated variant of model (default false) - virtual bool isActivator() const; + bool isActivator() const override; - virtual std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const; + std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const override; }; } diff --git a/apps/openmw/mwclass/actor.hpp b/apps/openmw/mwclass/actor.hpp index 6ccd552f94..3d509b2768 100644 --- a/apps/openmw/mwclass/actor.hpp +++ b/apps/openmw/mwclass/actor.hpp @@ -20,30 +20,30 @@ namespace MWClass public: virtual ~Actor(); - virtual void adjustPosition(const MWWorld::Ptr& ptr, bool force) const; + void adjustPosition(const MWWorld::Ptr& ptr, bool force) const override; ///< Adjust position to stand on ground. Must be called post model load /// @param force do this even if the ptr is flying - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual bool useAnim() const; + bool useAnim() const override; - virtual void block(const MWWorld::Ptr &ptr) const; + void block(const MWWorld::Ptr &ptr) const override; - virtual osg::Vec3f getRotationVector(const MWWorld::Ptr& ptr) const; + osg::Vec3f getRotationVector(const MWWorld::Ptr& ptr) const override; ///< Return desired rotations, as euler angles. Sets getMovementSettings(ptr).mRotation to zero. - virtual float getEncumbrance(const MWWorld::Ptr& ptr) const; + float getEncumbrance(const MWWorld::Ptr& ptr) const override; ///< Returns total weight of objects inside this object (including modifications from magic /// effects). Throws an exception, if the object can't hold other objects. - virtual bool allowTelekinesis(const MWWorld::ConstPtr& ptr) const; + bool allowTelekinesis(const MWWorld::ConstPtr& ptr) const override; ///< Return whether this class of object can be activated with telekinesis - virtual bool isActor() const; + bool isActor() const override; /// Return current movement speed. - virtual float getCurrentSpeed(const MWWorld::Ptr& ptr) const; + float getCurrentSpeed(const MWWorld::Ptr& ptr) const override; // not implemented Actor(const Actor&); diff --git a/apps/openmw/mwclass/apparatus.hpp b/apps/openmw/mwclass/apparatus.hpp index ea06f74bd5..8087c57ba3 100644 --- a/apps/openmw/mwclass/apparatus.hpp +++ b/apps/openmw/mwclass/apparatus.hpp @@ -8,50 +8,50 @@ namespace MWClass class Apparatus : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/armor.hpp b/apps/openmw/mwclass/armor.hpp index e25a4ae8aa..4f04e0824b 100644 --- a/apps/openmw/mwclass/armor.hpp +++ b/apps/openmw/mwclass/armor.hpp @@ -7,79 +7,79 @@ namespace MWClass { class Armor : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const; + bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override; ///< \return Item health data available? - virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const; + int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override; ///< Return item max health or throw an exception, if class does not have item health - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const; + int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const override; /// Return the index of the skill this item corresponds to when equipped or -1, if there is /// no such skill. - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const; + std::string getEnchantment (const MWWorld::ConstPtr& ptr) const override; ///< @return the enchantment ID if the object is enchanted, otherwise an empty string - virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; + std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const override; ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it. - virtual std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. \n /// Second item in the pair specifies the error message - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const; + int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; /// Get the effective armor rating, factoring in the actor's skills, for the given armor. - virtual float getEffectiveArmorRating(const MWWorld::ConstPtr& armor, const MWWorld::Ptr& actor) const; + float getEffectiveArmorRating(const MWWorld::ConstPtr& armor, const MWWorld::Ptr& actor) const override; }; } diff --git a/apps/openmw/mwclass/bodypart.hpp b/apps/openmw/mwclass/bodypart.hpp index b75dee7544..13d9141386 100644 --- a/apps/openmw/mwclass/bodypart.hpp +++ b/apps/openmw/mwclass/bodypart.hpp @@ -8,24 +8,24 @@ namespace MWClass class BodyPart : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; }; } diff --git a/apps/openmw/mwclass/book.hpp b/apps/openmw/mwclass/book.hpp index 6bdb4e79bd..c58e68ad87 100644 --- a/apps/openmw/mwclass/book.hpp +++ b/apps/openmw/mwclass/book.hpp @@ -7,58 +7,58 @@ namespace MWClass { class Book : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const; + std::string getEnchantment (const MWWorld::ConstPtr& ptr) const override; ///< @return the enchantment ID if the object is enchanted, otherwise an empty string - virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; + std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const override; ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it. - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const; + int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/clothing.hpp b/apps/openmw/mwclass/clothing.hpp index e71e9b307b..a87e0cbe00 100644 --- a/apps/openmw/mwclass/clothing.hpp +++ b/apps/openmw/mwclass/clothing.hpp @@ -7,70 +7,70 @@ namespace MWClass { class Clothing : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const; + int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const override; /// Return the index of the skill this item corresponds to when equipped or -1, if there is /// no such skill. - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const; + std::string getEnchantment (const MWWorld::ConstPtr& ptr) const override; ///< @return the enchantment ID if the object is enchanted, otherwise an empty string - virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; + std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const override; ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it. - virtual std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. /// Second item in the pair specifies the error message - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const; + int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/container.hpp b/apps/openmw/mwclass/container.hpp index 0ee549f817..54775e2b09 100644 --- a/apps/openmw/mwclass/container.hpp +++ b/apps/openmw/mwclass/container.hpp @@ -20,10 +20,10 @@ namespace MWClass ContainerCustomData(const ESM::Container& container, MWWorld::CellStore* cell); ContainerCustomData(const ESM::InventoryState& inventory); - virtual MWWorld::CustomData *clone() const; + MWWorld::CustomData *clone() const override; - virtual ContainerCustomData& asContainerCustomData(); - virtual const ContainerCustomData& asContainerCustomData() const; + ContainerCustomData& asContainerCustomData() override; + const ContainerCustomData& asContainerCustomData() const override; friend class Container; }; @@ -32,60 +32,58 @@ namespace MWClass { void ensureCustomData (const MWWorld::Ptr& ptr) const; - - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const; + MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const override; ///< Return container store - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual float getCapacity (const MWWorld::Ptr& ptr) const; + float getCapacity (const MWWorld::Ptr& ptr) const override; ///< Return total weight that fits into the object. Throws an exception, if the object can't /// hold other objects. - virtual float getEncumbrance (const MWWorld::Ptr& ptr) const; + float getEncumbrance (const MWWorld::Ptr& ptr) const override; ///< Returns total weight of objects inside this object (including modifications from magic /// effects). Throws an exception, if the object can't hold other objects. - virtual bool canLock(const MWWorld::ConstPtr &ptr) const; + bool canLock(const MWWorld::ConstPtr &ptr) const override; - virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) - const; + void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) + const override; ///< Read additional state from \a state into \a ptr. - virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) - const; + void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const override; ///< Write additional state from \a ptr into \a state. static void registerSelf(); - virtual void respawn (const MWWorld::Ptr& ptr) const; + void respawn (const MWWorld::Ptr& ptr) const override; - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool useAnim() const; + bool useAnim() const override; }; } diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 8e67498a14..c51eab513f 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -58,13 +58,13 @@ namespace MWClass MWWorld::ContainerStore* mContainerStore; // may be InventoryStore for some creatures MWMechanics::Movement mMovement; - virtual MWWorld::CustomData *clone() const; + MWWorld::CustomData *clone() const override; - virtual CreatureCustomData& asCreatureCustomData() + CreatureCustomData& asCreatureCustomData() override { return *this; } - virtual const CreatureCustomData& asCreatureCustomData() const + const CreatureCustomData& asCreatureCustomData() const override { return *this; } diff --git a/apps/openmw/mwclass/creature.hpp b/apps/openmw/mwclass/creature.hpp index 21d25633a0..0df782eafe 100644 --- a/apps/openmw/mwclass/creature.hpp +++ b/apps/openmw/mwclass/creature.hpp @@ -14,7 +14,7 @@ namespace MWClass { void ensureCustomData (const MWWorld::Ptr& ptr) const; - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; static int getSndGenTypeFromName(const MWWorld::Ptr &ptr, const std::string &name); @@ -40,97 +40,97 @@ namespace MWClass public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip(const MWWorld::ConstPtr& ptr) const; + bool hasToolTip(const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual MWMechanics::CreatureStats& getCreatureStats (const MWWorld::Ptr& ptr) const; + MWMechanics::CreatureStats& getCreatureStats (const MWWorld::Ptr& ptr) const override; ///< Return creature stats - virtual void hit(const MWWorld::Ptr& ptr, float attackStrength, int type) const; + void hit(const MWWorld::Ptr& ptr, float attackStrength, int type) const override; - virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const; + void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const override; - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWWorld::ContainerStore& getContainerStore ( - const MWWorld::Ptr& ptr) const; + MWWorld::ContainerStore& getContainerStore ( + const MWWorld::Ptr& ptr) const override; ///< Return container store - virtual MWWorld::InventoryStore& getInventoryStore (const MWWorld::Ptr& ptr) const; + MWWorld::InventoryStore& getInventoryStore (const MWWorld::Ptr& ptr) const override; ///< Return inventory store - virtual bool hasInventoryStore (const MWWorld::Ptr &ptr) const; + bool hasInventoryStore (const MWWorld::Ptr &ptr) const override; - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual float getCapacity (const MWWorld::Ptr& ptr) const; + float getCapacity (const MWWorld::Ptr& ptr) const override; ///< Return total weight that fits into the object. Throws an exception, if the object can't /// hold other objects. - virtual float getArmorRating (const MWWorld::Ptr& ptr) const; + float getArmorRating (const MWWorld::Ptr& ptr) const override; ///< @return combined armor rating of this actor - virtual bool isEssential (const MWWorld::ConstPtr& ptr) const; + bool isEssential (const MWWorld::ConstPtr& ptr) const override; ///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable) - virtual int getServices (const MWWorld::ConstPtr& actor) const; + int getServices (const MWWorld::ConstPtr& actor) const override; - virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const; + bool isPersistent (const MWWorld::ConstPtr& ptr) const override; - virtual std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const; + std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const override; - virtual MWMechanics::Movement& getMovementSettings (const MWWorld::Ptr& ptr) const; + MWMechanics::Movement& getMovementSettings (const MWWorld::Ptr& ptr) const override; ///< Return desired movement. - float getMaxSpeed (const MWWorld::Ptr& ptr) const; + float getMaxSpeed (const MWWorld::Ptr& ptr) const override; static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const; + void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const override; ///< Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel(). - virtual bool isBipedal (const MWWorld::ConstPtr &ptr) const; - virtual bool canFly (const MWWorld::ConstPtr &ptr) const; - virtual bool canSwim (const MWWorld::ConstPtr &ptr) const; - virtual bool canWalk (const MWWorld::ConstPtr &ptr) const; + bool isBipedal (const MWWorld::ConstPtr &ptr) const override; + bool canFly (const MWWorld::ConstPtr &ptr) const override; + bool canSwim (const MWWorld::ConstPtr &ptr) const override; + bool canWalk (const MWWorld::ConstPtr &ptr) const override; - virtual float getSkill(const MWWorld::Ptr &ptr, int skill) const; + float getSkill(const MWWorld::Ptr &ptr, int skill) const override; /// Get a blood texture suitable for \a ptr (see Blood Texture 0-2 in Morrowind.ini) - virtual int getBloodTexture (const MWWorld::ConstPtr& ptr) const; + int getBloodTexture (const MWWorld::ConstPtr& ptr) const override; - virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const; + void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const override; ///< Read additional state from \a state into \a ptr. - virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const; + void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const override; ///< Write additional state from \a ptr into \a state. - virtual int getBaseGold(const MWWorld::ConstPtr& ptr) const; + int getBaseGold(const MWWorld::ConstPtr& ptr) const override; - virtual void respawn (const MWWorld::Ptr& ptr) const; + void respawn (const MWWorld::Ptr& ptr) const override; - virtual int getBaseFightRating(const MWWorld::ConstPtr &ptr) const; + int getBaseFightRating(const MWWorld::ConstPtr &ptr) const override; - virtual void adjustScale(const MWWorld::ConstPtr& ptr, osg::Vec3f& scale, bool rendering) const; + void adjustScale(const MWWorld::ConstPtr& ptr, osg::Vec3f& scale, bool rendering) const override; /// @param rendering Indicates if the scale to adjust is for the rendering mesh, or for the collision mesh - virtual void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value) const; + void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value) const override; - virtual void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const; + void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const override; float getWalkSpeed(const MWWorld::Ptr& ptr) const final; diff --git a/apps/openmw/mwclass/creaturelevlist.cpp b/apps/openmw/mwclass/creaturelevlist.cpp index 2f3ac0d1e8..e3e52901e0 100644 --- a/apps/openmw/mwclass/creaturelevlist.cpp +++ b/apps/openmw/mwclass/creaturelevlist.cpp @@ -17,13 +17,13 @@ namespace MWClass int mSpawnActorId; bool mSpawn; // Should a new creature be spawned? - virtual MWWorld::CustomData *clone() const; + MWWorld::CustomData *clone() const override; - virtual CreatureLevListCustomData& asCreatureLevListCustomData() + CreatureLevListCustomData& asCreatureLevListCustomData() override { return *this; } - virtual const CreatureLevListCustomData& asCreatureLevListCustomData() const + const CreatureLevListCustomData& asCreatureLevListCustomData() const override { return *this; } diff --git a/apps/openmw/mwclass/creaturelevlist.hpp b/apps/openmw/mwclass/creaturelevlist.hpp index 3a05f5272c..35152a9422 100644 --- a/apps/openmw/mwclass/creaturelevlist.hpp +++ b/apps/openmw/mwclass/creaturelevlist.hpp @@ -11,27 +11,27 @@ namespace MWClass public: - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) static void registerSelf(); - virtual void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const; + void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const override; ///< Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel(). - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const; + void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const override; ///< Read additional state from \a state into \a ptr. - virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const; + void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const override; ///< Write additional state from \a ptr into \a state. - virtual void respawn (const MWWorld::Ptr& ptr) const; + void respawn (const MWWorld::Ptr& ptr) const override; }; } diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 4f82aa9770..ba51d9c2bc 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -36,13 +36,13 @@ namespace MWClass public: MWWorld::DoorState mDoorState = MWWorld::DoorState::Idle; - virtual MWWorld::CustomData *clone() const; + MWWorld::CustomData *clone() const override; - virtual DoorCustomData& asDoorCustomData() + DoorCustomData& asDoorCustomData() override { return *this; } - virtual const DoorCustomData& asDoorCustomData() const + const DoorCustomData& asDoorCustomData() const override { return *this; } diff --git a/apps/openmw/mwclass/door.hpp b/apps/openmw/mwclass/door.hpp index 84761900ca..6c2fa26b80 100644 --- a/apps/openmw/mwclass/door.hpp +++ b/apps/openmw/mwclass/door.hpp @@ -11,55 +11,53 @@ namespace MWClass { void ensureCustomData (const MWWorld::Ptr& ptr) const; - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual bool isDoor() const; + bool isDoor() const override; - virtual bool useAnim() const; + bool useAnim() const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. static std::string getDestination (const MWWorld::LiveCellRef& door); ///< @return destination cell name or token - virtual bool canLock(const MWWorld::ConstPtr &ptr) const; + bool canLock(const MWWorld::ConstPtr &ptr) const override; - virtual bool allowTelekinesis(const MWWorld::ConstPtr &ptr) const; + bool allowTelekinesis(const MWWorld::ConstPtr &ptr) const override; ///< Return whether this class of object can be activated with telekinesis - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual MWWorld::DoorState getDoorState (const MWWorld::ConstPtr &ptr) const; + MWWorld::DoorState getDoorState (const MWWorld::ConstPtr &ptr) const override; /// This does not actually cause the door to move. Use World::activateDoor instead. - virtual void setDoorState (const MWWorld::Ptr &ptr, MWWorld::DoorState state) const; + void setDoorState (const MWWorld::Ptr &ptr, MWWorld::DoorState state) const override; - virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) - const; + void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const override; ///< Read additional state from \a state into \a ptr. - virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) - const; + void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const override; ///< Write additional state from \a ptr into \a state. }; } diff --git a/apps/openmw/mwclass/ingredient.hpp b/apps/openmw/mwclass/ingredient.hpp index 8b2ea4f86a..5219cf39ce 100644 --- a/apps/openmw/mwclass/ingredient.hpp +++ b/apps/openmw/mwclass/ingredient.hpp @@ -7,50 +7,50 @@ namespace MWClass { class Ingredient : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/itemlevlist.hpp b/apps/openmw/mwclass/itemlevlist.hpp index 36019f491d..771f8b7a76 100644 --- a/apps/openmw/mwclass/itemlevlist.hpp +++ b/apps/openmw/mwclass/itemlevlist.hpp @@ -9,10 +9,10 @@ namespace MWClass { public: - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) static void registerSelf(); diff --git a/apps/openmw/mwclass/light.hpp b/apps/openmw/mwclass/light.hpp index ba3179971e..e37dddc250 100644 --- a/apps/openmw/mwclass/light.hpp +++ b/apps/openmw/mwclass/light.hpp @@ -7,71 +7,71 @@ namespace MWClass { class Light : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual bool useAnim() const; + bool useAnim() const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual bool showsInInventory (const MWWorld::ConstPtr& ptr) const; + bool showsInInventory (const MWWorld::ConstPtr& ptr) const override; - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual void setRemainingUsageTime (const MWWorld::Ptr& ptr, float duration) const; + void setRemainingUsageTime (const MWWorld::Ptr& ptr, float duration) const override; ///< Sets the remaining duration of the object. - virtual float getRemainingUsageTime (const MWWorld::ConstPtr& ptr) const; + float getRemainingUsageTime (const MWWorld::ConstPtr& ptr) const override; ///< Returns the remaining duration of the object. - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; - std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; - virtual std::string getSound(const MWWorld::ConstPtr& ptr) const; + std::string getSound(const MWWorld::ConstPtr& ptr) const override; }; } diff --git a/apps/openmw/mwclass/lockpick.hpp b/apps/openmw/mwclass/lockpick.hpp index 20ca2d1666..fabae33435 100644 --- a/apps/openmw/mwclass/lockpick.hpp +++ b/apps/openmw/mwclass/lockpick.hpp @@ -7,61 +7,61 @@ namespace MWClass { class Lockpick : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const; + int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override; ///< Return item max health or throw an exception, if class does not have item health - virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const { return true; } + bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override { return true; } ///< \return Item health data available? (default implementation: false) }; } diff --git a/apps/openmw/mwclass/misc.hpp b/apps/openmw/mwclass/misc.hpp index 4812deb5f8..9bff85ca56 100644 --- a/apps/openmw/mwclass/misc.hpp +++ b/apps/openmw/mwclass/misc.hpp @@ -9,52 +9,52 @@ namespace MWClass { public: - virtual MWWorld::Ptr copyToCell(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell, int count) const; + MWWorld::Ptr copyToCell(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell, int count) const override; - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; - virtual bool isKey (const MWWorld::ConstPtr &ptr) const; + bool isKey (const MWWorld::ConstPtr &ptr) const override; - virtual bool isGold (const MWWorld::ConstPtr& ptr) const; + bool isGold (const MWWorld::ConstPtr& ptr) const override; }; } diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 0187f27275..6e8f56925a 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -253,13 +253,13 @@ namespace MWClass MWMechanics::Movement mMovement; MWWorld::InventoryStore mInventoryStore; - virtual MWWorld::CustomData *clone() const; + MWWorld::CustomData *clone() const override; - virtual NpcCustomData& asNpcCustomData() + NpcCustomData& asNpcCustomData() override { return *this; } - virtual const NpcCustomData& asNpcCustomData() const + const NpcCustomData& asNpcCustomData() const override { return *this; } diff --git a/apps/openmw/mwclass/npc.hpp b/apps/openmw/mwclass/npc.hpp index 43340b8d71..dc5fee73a3 100644 --- a/apps/openmw/mwclass/npc.hpp +++ b/apps/openmw/mwclass/npc.hpp @@ -14,7 +14,7 @@ namespace MWClass { void ensureCustomData (const MWWorld::Ptr& ptr) const; - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; struct GMST { @@ -44,128 +44,127 @@ namespace MWClass public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual MWMechanics::CreatureStats& getCreatureStats (const MWWorld::Ptr& ptr) const; + MWMechanics::CreatureStats& getCreatureStats (const MWWorld::Ptr& ptr) const override; ///< Return creature stats - virtual MWMechanics::NpcStats& getNpcStats (const MWWorld::Ptr& ptr) const; + MWMechanics::NpcStats& getNpcStats (const MWWorld::Ptr& ptr) const override; ///< Return NPC stats - virtual MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const; + MWWorld::ContainerStore& getContainerStore (const MWWorld::Ptr& ptr) const override; ///< Return container store - virtual bool hasToolTip(const MWWorld::ConstPtr& ptr) const; + bool hasToolTip(const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual MWWorld::InventoryStore& getInventoryStore (const MWWorld::Ptr& ptr) const; + MWWorld::InventoryStore& getInventoryStore (const MWWorld::Ptr& ptr) const override; ///< Return inventory store - virtual bool hasInventoryStore(const MWWorld::Ptr &ptr) const { return true; } + bool hasInventoryStore(const MWWorld::Ptr &ptr) const override { return true; } - virtual void hit(const MWWorld::Ptr& ptr, float attackStrength, int type) const; + void hit(const MWWorld::Ptr& ptr, float attackStrength, int type) const override; - virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const; + void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const override; - virtual void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const; + void getModelsToPreload(const MWWorld::Ptr& ptr, std::vector& models) const override; ///< Get a list of models to preload that this object may use (directly or indirectly). default implementation: list getModel(). - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual float getMaxSpeed (const MWWorld::Ptr& ptr) const; + float getMaxSpeed (const MWWorld::Ptr& ptr) const override; ///< Return maximal movement speed. - virtual float getJump(const MWWorld::Ptr &ptr) const; + float getJump(const MWWorld::Ptr &ptr) const override; ///< Return jump velocity (not accounting for movement) - virtual MWMechanics::Movement& getMovementSettings (const MWWorld::Ptr& ptr) const; + MWMechanics::Movement& getMovementSettings (const MWWorld::Ptr& ptr) const override; ///< Return desired movement. - virtual float getCapacity (const MWWorld::Ptr& ptr) const; + float getCapacity (const MWWorld::Ptr& ptr) const override; ///< Return total weight that fits into the object. Throws an exception, if the object can't /// hold other objects. - virtual float getEncumbrance (const MWWorld::Ptr& ptr) const; + float getEncumbrance (const MWWorld::Ptr& ptr) const override; ///< Returns total weight of objects inside this object (including modifications from magic /// effects). Throws an exception, if the object can't hold other objects. - virtual float getArmorRating (const MWWorld::Ptr& ptr) const; + float getArmorRating (const MWWorld::Ptr& ptr) const override; ///< @return combined armor rating of this actor - virtual bool apply (const MWWorld::Ptr& ptr, const std::string& id, - const MWWorld::Ptr& actor) const; + bool apply (const MWWorld::Ptr& ptr, const std::string& id, + const MWWorld::Ptr& actor) const override; ///< Apply \a id on \a ptr. /// \param actor Actor that is resposible for the ID being applied to \a ptr. /// \return Any effect? - virtual void adjustScale (const MWWorld::ConstPtr &ptr, osg::Vec3f &scale, bool rendering) const; + void adjustScale (const MWWorld::ConstPtr &ptr, osg::Vec3f &scale, bool rendering) const override; /// @param rendering Indicates if the scale to adjust is for the rendering mesh, or for the collision mesh - virtual void skillUsageSucceeded (const MWWorld::Ptr& ptr, int skill, int usageType, float extraFactor=1.f) const; + void skillUsageSucceeded (const MWWorld::Ptr& ptr, int skill, int usageType, float extraFactor=1.f) const override; ///< Inform actor \a ptr that a skill use has succeeded. - virtual bool isEssential (const MWWorld::ConstPtr& ptr) const; + bool isEssential (const MWWorld::ConstPtr& ptr) const override; ///< Is \a ptr essential? (i.e. may losing \a ptr make the game unwinnable) - virtual int getServices (const MWWorld::ConstPtr& actor) const; + int getServices (const MWWorld::ConstPtr& actor) const override; - virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const; + bool isPersistent (const MWWorld::ConstPtr& ptr) const override; - virtual std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const; + std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const override; static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual float getSkill(const MWWorld::Ptr& ptr, int skill) const; + float getSkill(const MWWorld::Ptr& ptr, int skill) const override; /// Get a blood texture suitable for \a ptr (see Blood Texture 0-2 in Morrowind.ini) - virtual int getBloodTexture (const MWWorld::ConstPtr& ptr) const; + int getBloodTexture (const MWWorld::ConstPtr& ptr) const override; - virtual bool isNpc() const { + bool isNpc() const override + { return true; } - virtual void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) - const; + void readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const override; ///< Read additional state from \a state into \a ptr. - virtual void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) - const; + void writeAdditionalState (const MWWorld::ConstPtr& ptr, ESM::ObjectState& state) const override; ///< Write additional state from \a ptr into \a state. - virtual int getBaseGold(const MWWorld::ConstPtr& ptr) const; + int getBaseGold(const MWWorld::ConstPtr& ptr) const override; - virtual bool isClass(const MWWorld::ConstPtr& ptr, const std::string &className) const; + bool isClass(const MWWorld::ConstPtr& ptr, const std::string &className) const override; - virtual bool canSwim (const MWWorld::ConstPtr &ptr) const; + bool canSwim (const MWWorld::ConstPtr &ptr) const override; - virtual bool canWalk (const MWWorld::ConstPtr &ptr) const; + bool canWalk (const MWWorld::ConstPtr &ptr) const override; - virtual bool isBipedal (const MWWorld::ConstPtr &ptr) const; + bool isBipedal (const MWWorld::ConstPtr &ptr) const override; - virtual void respawn (const MWWorld::Ptr& ptr) const; + void respawn (const MWWorld::Ptr& ptr) const override; - virtual int getBaseFightRating (const MWWorld::ConstPtr& ptr) const; + int getBaseFightRating (const MWWorld::ConstPtr& ptr) const override; - virtual std::string getPrimaryFaction(const MWWorld::ConstPtr &ptr) const; - virtual int getPrimaryFactionRank(const MWWorld::ConstPtr &ptr) const; + std::string getPrimaryFaction(const MWWorld::ConstPtr &ptr) const override; + int getPrimaryFactionRank(const MWWorld::ConstPtr &ptr) const override; - virtual void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value) const; + void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value) const override; - virtual void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const; + void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const override; float getWalkSpeed(const MWWorld::Ptr& ptr) const final; diff --git a/apps/openmw/mwclass/potion.hpp b/apps/openmw/mwclass/potion.hpp index 8ec4aef446..75d923f0ba 100644 --- a/apps/openmw/mwclass/potion.hpp +++ b/apps/openmw/mwclass/potion.hpp @@ -7,50 +7,50 @@ namespace MWClass { class Potion : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/probe.hpp b/apps/openmw/mwclass/probe.hpp index 51a5f8231a..a0a41dcfb6 100644 --- a/apps/openmw/mwclass/probe.hpp +++ b/apps/openmw/mwclass/probe.hpp @@ -7,61 +7,61 @@ namespace MWClass { class Probe : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const; + int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override; ///< Return item max health or throw an exception, if class does not have item health - virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const { return true; } + bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override { return true; } ///< \return Item health data available? (default implementation: false) }; } diff --git a/apps/openmw/mwclass/repair.hpp b/apps/openmw/mwclass/repair.hpp index 5d2cfb6828..b9791e9cf4 100644 --- a/apps/openmw/mwclass/repair.hpp +++ b/apps/openmw/mwclass/repair.hpp @@ -7,59 +7,58 @@ namespace MWClass { class Repair : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) - const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu (default implementation: return a /// null action). - virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const; + bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override; ///< \return Item health data available? (default implementation: false) - virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const; + int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override; ///< Return item max health or throw an exception, if class does not have item health /// (default implementation: throw an exception) - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; }; } diff --git a/apps/openmw/mwclass/static.hpp b/apps/openmw/mwclass/static.hpp index 6b3b8088c5..6bc783dad0 100644 --- a/apps/openmw/mwclass/static.hpp +++ b/apps/openmw/mwclass/static.hpp @@ -7,24 +7,24 @@ namespace MWClass { class Static : public MWWorld::Class { - virtual MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual bool hasToolTip (const MWWorld::ConstPtr& ptr) const; + bool hasToolTip (const MWWorld::ConstPtr& ptr) const override; ///< @return true if this object has a tooltip when focused (default implementation: true) static void registerSelf(); - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; }; } diff --git a/apps/openmw/mwclass/weapon.hpp b/apps/openmw/mwclass/weapon.hpp index 2c1197b69e..f1824b7d14 100644 --- a/apps/openmw/mwclass/weapon.hpp +++ b/apps/openmw/mwclass/weapon.hpp @@ -7,77 +7,77 @@ namespace MWClass { class Weapon : public MWWorld::Class { - virtual MWWorld::Ptr - copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const; + MWWorld::Ptr + copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const override; public: - virtual void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const; + void insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const override; ///< Add reference into a cell for rendering - virtual void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const; + void insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWPhysics::PhysicsSystem& physics) const override; - virtual std::string getName (const MWWorld::ConstPtr& ptr) const; + std::string getName (const MWWorld::ConstPtr& ptr) const override; ///< \return name or ID; can return an empty string. - virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, - const MWWorld::Ptr& actor) const; + std::shared_ptr activate (const MWWorld::Ptr& ptr, + const MWWorld::Ptr& actor) const override; ///< Generate action for activation - virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const; + MWGui::ToolTipInfo getToolTipInfo (const MWWorld::ConstPtr& ptr, int count) const override; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual bool hasItemHealth (const MWWorld::ConstPtr& ptr) const; + bool hasItemHealth (const MWWorld::ConstPtr& ptr) const override; ///< \return Item health data available? - virtual int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const; + int getItemMaxHealth (const MWWorld::ConstPtr& ptr) const override; ///< Return item max health or throw an exception, if class does not have item health - virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; + std::string getScript (const MWWorld::ConstPtr& ptr) const override; ///< Return name of the script attached to ptr - virtual std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const; + std::pair, bool> getEquipmentSlots (const MWWorld::ConstPtr& ptr) const override; ///< \return first: Return IDs of the slot this object can be equipped in; second: can object /// stay stacked when equipped? - virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const; + int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const override; /// Return the index of the skill this item corresponds to when equipped or -1, if there is /// no such skill. - virtual int getValue (const MWWorld::ConstPtr& ptr) const; + int getValue (const MWWorld::ConstPtr& ptr) const override; ///< Return trade value of the object. Throws an exception, if the object can't be traded. static void registerSelf(); - virtual std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getUpSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the pick up sound Id - virtual std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const; + std::string getDownSoundId (const MWWorld::ConstPtr& ptr) const override; ///< Return the put down sound Id - virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; + std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const override; ///< Return name of inventory icon. - virtual std::string getEnchantment (const MWWorld::ConstPtr& ptr) const; + std::string getEnchantment (const MWWorld::ConstPtr& ptr) const override; ///< @return the enchantment ID if the object is enchanted, otherwise an empty string - virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; + std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const override; ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it. - virtual std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const; + std::pair canBeEquipped(const MWWorld::ConstPtr &ptr, const MWWorld::Ptr &npc) const override; ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. /// Second item in the pair specifies the error message - virtual std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const; + std::shared_ptr use (const MWWorld::Ptr& ptr, bool force=false) const override; ///< Generate action for using via inventory menu - virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; + std::string getModel(const MWWorld::ConstPtr &ptr) const override; - virtual bool canSell (const MWWorld::ConstPtr& item, int npcServices) const; + bool canSell (const MWWorld::ConstPtr& item, int npcServices) const override; - virtual float getWeight (const MWWorld::ConstPtr& ptr) const; + float getWeight (const MWWorld::ConstPtr& ptr) const override; - virtual int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const; + int getEnchantmentPoints (const MWWorld::ConstPtr& ptr) const override; }; } diff --git a/apps/openmw/mwdialogue/dialoguemanagerimp.hpp b/apps/openmw/mwdialogue/dialoguemanagerimp.hpp index 23dd68e918..77e59b6331 100644 --- a/apps/openmw/mwdialogue/dialoguemanagerimp.hpp +++ b/apps/openmw/mwdialogue/dialoguemanagerimp.hpp @@ -66,57 +66,57 @@ namespace MWDialogue DialogueManager (const Compiler::Extensions& extensions, Translation::Storage& translationDataStorage); - virtual void clear(); + void clear() override; - virtual bool isInChoice() const; + bool isInChoice() const override; - virtual bool startDialogue (const MWWorld::Ptr& actor, ResponseCallback* callback); + bool startDialogue (const MWWorld::Ptr& actor, ResponseCallback* callback) override; - std::list getAvailableTopics(); + std::list getAvailableTopics() override; int getTopicFlag(const std::string& topicId) final; bool inJournal (const std::string& topicId, const std::string& infoId) final; - virtual void addTopic (const std::string& topic); + void addTopic (const std::string& topic) override; - virtual void addChoice (const std::string& text,int choice); - const std::vector >& getChoices(); + void addChoice (const std::string& text,int choice) override; + const std::vector >& getChoices() override; - virtual bool isGoodbye(); + bool isGoodbye() override; - virtual void goodbye(); + void goodbye() override; - virtual bool checkServiceRefused (ResponseCallback* callback); + bool checkServiceRefused (ResponseCallback* callback) override; - virtual void say(const MWWorld::Ptr &actor, const std::string &topic); + void say(const MWWorld::Ptr &actor, const std::string &topic) override; //calbacks for the GUI - virtual void keywordSelected (const std::string& keyword, ResponseCallback* callback); - virtual void goodbyeSelected(); - virtual void questionAnswered (int answer, ResponseCallback* callback); + void keywordSelected (const std::string& keyword, ResponseCallback* callback) override; + void goodbyeSelected() override; + void questionAnswered (int answer, ResponseCallback* callback) override; - virtual void persuade (int type, ResponseCallback* callback); - virtual int getTemporaryDispositionChange () const; + void persuade (int type, ResponseCallback* callback) override; + int getTemporaryDispositionChange () const override; /// @note Controlled by an option, gets discarded when dialogue ends by default - virtual void applyBarterDispositionChange (int delta); + void applyBarterDispositionChange (int delta) override; - virtual int countSavedGameRecords() const; + int countSavedGameRecords() const override; - virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const; + void write (ESM::ESMWriter& writer, Loading::Listener& progress) const override; - virtual void readRecord (ESM::ESMReader& reader, uint32_t type); + void readRecord (ESM::ESMReader& reader, uint32_t type) override; /// Changes faction1's opinion of faction2 by \a diff. - virtual void modFactionReaction (const std::string& faction1, const std::string& faction2, int diff); + void modFactionReaction (const std::string& faction1, const std::string& faction2, int diff) override; - virtual void setFactionReaction (const std::string& faction1, const std::string& faction2, int absolute); + void setFactionReaction (const std::string& faction1, const std::string& faction2, int absolute) override; /// @return faction1's opinion of faction2 - virtual int getFactionReaction (const std::string& faction1, const std::string& faction2) const; + int getFactionReaction (const std::string& faction1, const std::string& faction2) const override; /// Removes the last added topic response for the given actor from the journal - virtual void clearInfoActor (const MWWorld::Ptr& actor) const; + void clearInfoActor (const MWWorld::Ptr& actor) const override; }; } diff --git a/apps/openmw/mwdialogue/journalimp.hpp b/apps/openmw/mwdialogue/journalimp.hpp index c3e9406290..a6501e54e1 100644 --- a/apps/openmw/mwdialogue/journalimp.hpp +++ b/apps/openmw/mwdialogue/journalimp.hpp @@ -27,52 +27,52 @@ namespace MWDialogue Journal(); - virtual void clear(); + void clear() override; - virtual void addEntry (const std::string& id, int index, const MWWorld::Ptr& actor); + void addEntry (const std::string& id, int index, const MWWorld::Ptr& actor) override; ///< Add a journal entry. /// @param actor Used as context for replacing of escape sequences (%name, etc). - virtual void setJournalIndex (const std::string& id, int index); + void setJournalIndex (const std::string& id, int index) override; ///< Set the journal index without adding an entry. - virtual int getJournalIndex (const std::string& id) const; + int getJournalIndex (const std::string& id) const override; ///< Get the journal index. - virtual void addTopic (const std::string& topicId, const std::string& infoId, const MWWorld::Ptr& actor); + void addTopic (const std::string& topicId, const std::string& infoId, const MWWorld::Ptr& actor) override; /// \note topicId must be lowercase - virtual void removeLastAddedTopicResponse (const std::string& topicId, const std::string& actorName); + void removeLastAddedTopicResponse (const std::string& topicId, const std::string& actorName) override; ///< Removes the last topic response added for the given topicId and actor name. /// \note topicId must be lowercase - virtual TEntryIter begin() const; + TEntryIter begin() const override; ///< Iterator pointing to the begin of the main journal. /// /// \note Iterators to main journal entries will never become invalid. - virtual TEntryIter end() const; + TEntryIter end() const override; ///< Iterator pointing past the end of the main journal. - virtual TQuestIter questBegin() const; + TQuestIter questBegin() const override; ///< Iterator pointing to the first quest (sorted by topic ID) - virtual TQuestIter questEnd() const; + TQuestIter questEnd() const override; ///< Iterator pointing past the last quest. - virtual TTopicIter topicBegin() const; + TTopicIter topicBegin() const override; ///< Iterator pointing to the first topic (sorted by topic ID) /// /// \note The topic ID is identical with the user-visible topic string. - virtual TTopicIter topicEnd() const; + TTopicIter topicEnd() const override; ///< Iterator pointing past the last topic. - virtual int countSavedGameRecords() const; + int countSavedGameRecords() const override; - virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const; + void write (ESM::ESMWriter& writer, Loading::Listener& progress) const override; - virtual void readRecord (ESM::ESMReader& reader, uint32_t type); + void readRecord (ESM::ESMReader& reader, uint32_t type) override; }; } diff --git a/apps/openmw/mwdialogue/quest.hpp b/apps/openmw/mwdialogue/quest.hpp index 40824f398e..712f94fae4 100644 --- a/apps/openmw/mwdialogue/quest.hpp +++ b/apps/openmw/mwdialogue/quest.hpp @@ -24,7 +24,7 @@ namespace MWDialogue Quest (const ESM::QuestState& state); - virtual std::string getName() const; + std::string getName() const override; ///< May be an empty string int getIndex() const; @@ -34,7 +34,7 @@ namespace MWDialogue bool isFinished() const; - virtual void addEntry (const JournalEntry& entry); + void addEntry (const JournalEntry& entry) override; ///< Add entry and adjust index accordingly. /// /// \note Redundant entries are ignored, but the index is still adjusted. diff --git a/apps/openmw/mwgui/alchemywindow.hpp b/apps/openmw/mwgui/alchemywindow.hpp index 82dd0a2431..33bd1f9743 100644 --- a/apps/openmw/mwgui/alchemywindow.hpp +++ b/apps/openmw/mwgui/alchemywindow.hpp @@ -29,9 +29,9 @@ namespace MWGui public: AlchemyWindow(); - virtual void onOpen(); + void onOpen() override; - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } private: diff --git a/apps/openmw/mwgui/birth.hpp b/apps/openmw/mwgui/birth.hpp index 86af14286c..9f9d4332f1 100644 --- a/apps/openmw/mwgui/birth.hpp +++ b/apps/openmw/mwgui/birth.hpp @@ -20,9 +20,9 @@ namespace MWGui void setBirthId(const std::string &raceId); void setNextButtonShow(bool shown); - virtual void onOpen(); + void onOpen() override; - bool exit() { return false; } + bool exit() override { return false; } // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index 47027c2b7c..a346526ebb 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -115,9 +115,9 @@ struct TypesetBookImpl : TypesetBook return Range (i->data(), i->data() + i->size()); } - size_t pageCount () const { return mPages.size (); } + size_t pageCount () const override { return mPages.size (); } - std::pair getSize () const + std::pair getSize () const override { return std::make_pair (mRect.width (), mRect.height ()); } @@ -261,7 +261,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter { } - Style * createStyle (const std::string& fontName, const Colour& fontColour, bool useBookFont) + Style * createStyle (const std::string& fontName, const Colour& fontColour, bool useBookFont) override { std::string fullFontName; if (fontName.empty()) @@ -291,7 +291,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter } Style* createHotStyle (Style* baseStyle, const Colour& normalColour, const Colour& hoverColour, - const Colour& activeColour, InteractiveId id, bool unique) + const Colour& activeColour, InteractiveId id, bool unique) override { StyleImpl* BaseStyle = static_cast (baseStyle); @@ -311,14 +311,14 @@ struct TypesetBookImpl::Typesetter : BookTypesetter return &style; } - void write (Style * style, Utf8Span text) + void write (Style * style, Utf8Span text) override { Range range = mBook->addContent (text); writeImpl (static_cast (style), range.first, range.second); } - intptr_t addContent (Utf8Span text, bool select) + intptr_t addContent (Utf8Span text, bool select) override { add_partial_text(); @@ -330,14 +330,14 @@ struct TypesetBookImpl::Typesetter : BookTypesetter return reinterpret_cast (&(*i)); } - void selectContent (intptr_t contentHandle) + void selectContent (intptr_t contentHandle) override { add_partial_text(); mCurrentContent = reinterpret_cast (contentHandle); } - void write (Style * style, size_t begin, size_t end) + void write (Style * style, size_t begin, size_t end) override { assert (mCurrentContent != nullptr); assert (end <= mCurrentContent->size ()); @@ -349,7 +349,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter writeImpl (static_cast (style), begin_, end_); } - void lineBreak (float margin) + void lineBreak (float margin) override { assert (margin == 0); //TODO: figure out proper behavior here... @@ -359,7 +359,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter mLine = nullptr; } - void sectionBreak (int margin) + void sectionBreak (int margin) override { add_partial_text(); @@ -374,7 +374,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter } } - void setSectionAlignment (Alignment sectionAlignment) + void setSectionAlignment (Alignment sectionAlignment) override { add_partial_text(); @@ -383,7 +383,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter mCurrentAlignment = sectionAlignment; } - TypesetBook::Ptr complete () + TypesetBook::Ptr complete () override { int curPageStart = 0; int curPageStop = 0; @@ -869,12 +869,12 @@ protected: } } - void doRender() { mDisplay->doRender (*this); } + void doRender() override { mDisplay->doRender (*this); } // this isn't really a sub-widget, its just a "drawitem" which // should have its own interface - void createDrawItem(MyGUI::ITexture* _texture, MyGUI::ILayerNode* _node) {} - void destroyDrawItem() {}; + void createDrawItem(MyGUI::ITexture* _texture, MyGUI::ILayerNode* _node) override {} + void destroyDrawItem() override {} }; void resetPage() diff --git a/apps/openmw/mwgui/bookwindow.hpp b/apps/openmw/mwgui/bookwindow.hpp index b0dfe09ce2..116437f22e 100644 --- a/apps/openmw/mwgui/bookwindow.hpp +++ b/apps/openmw/mwgui/bookwindow.hpp @@ -14,10 +14,10 @@ namespace MWGui public: BookWindow(); - void setPtr(const MWWorld::Ptr& book); + void setPtr(const MWWorld::Ptr& book) override; void setInventoryAllowed(bool allowed); - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } protected: void onNextPageButtonClicked (MyGUI::Widget* sender); diff --git a/apps/openmw/mwgui/class.hpp b/apps/openmw/mwgui/class.hpp index 3a2573fd46..bb34a05530 100644 --- a/apps/openmw/mwgui/class.hpp +++ b/apps/openmw/mwgui/class.hpp @@ -21,9 +21,9 @@ namespace MWGui std::string getText() const; void setButtons(ButtonList &buttons); - virtual void onOpen(); + void onOpen() override; - bool exit() { return false; } + bool exit() override { return false; } // Events typedef MyGUI::delegates::CMultiDelegate1 EventHandle_Int; @@ -69,7 +69,7 @@ namespace MWGui std::string getClassId() const; void setClassId(const std::string &classId); - bool exit() { return false; } + bool exit() override { return false; } // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; @@ -104,9 +104,9 @@ namespace MWGui void setClassId(const std::string &classId); void setNextButtonShow(bool shown); - virtual void onOpen(); + void onOpen() override; - bool exit() { return false; } + bool exit() override { return false; } // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; @@ -148,7 +148,7 @@ namespace MWGui SelectSpecializationDialog(); ~SelectSpecializationDialog(); - virtual bool exit(); + bool exit() override; ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; } @@ -181,7 +181,7 @@ namespace MWGui SelectAttributeDialog(); ~SelectAttributeDialog(); - virtual bool exit(); + bool exit() override; ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; } @@ -212,7 +212,7 @@ namespace MWGui SelectSkillDialog(); ~SelectSkillDialog(); - virtual bool exit(); + bool exit() override; ESM::Skill::SkillEnum getSkillId() const { return mSkillId; } @@ -268,7 +268,7 @@ namespace MWGui CreateClassDialog(); virtual ~CreateClassDialog(); - bool exit() { return false; } + bool exit() override { return false; } std::string getName() const; std::string getDescription() const; diff --git a/apps/openmw/mwgui/companionitemmodel.hpp b/apps/openmw/mwgui/companionitemmodel.hpp index b30a981421..1872dd1569 100644 --- a/apps/openmw/mwgui/companionitemmodel.hpp +++ b/apps/openmw/mwgui/companionitemmodel.hpp @@ -13,8 +13,8 @@ namespace MWGui public: CompanionItemModel (const MWWorld::Ptr& actor); - virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true); - virtual void removeItem (const ItemStack& item, size_t count); + MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override; + void removeItem (const ItemStack& item, size_t count) override; bool hasProfit(const MWWorld::Ptr& actor); }; diff --git a/apps/openmw/mwgui/companionwindow.hpp b/apps/openmw/mwgui/companionwindow.hpp index 442ce57daf..7a7c92e3dc 100644 --- a/apps/openmw/mwgui/companionwindow.hpp +++ b/apps/openmw/mwgui/companionwindow.hpp @@ -22,13 +22,13 @@ namespace MWGui public: CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager); - virtual bool exit(); + bool exit() override; - virtual void resetReference(); + void resetReference() override; - void setPtr(const MWWorld::Ptr& npc); - void onFrame (float dt); - void clear() { resetReference(); } + void setPtr(const MWWorld::Ptr& npc) override; + void onFrame (float dt) override; + void clear() override { resetReference(); } private: ItemView* mItemView; @@ -55,7 +55,7 @@ namespace MWGui void onCloseButtonClicked(MyGUI::Widget* _sender); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; }; } diff --git a/apps/openmw/mwgui/confirmationdialog.hpp b/apps/openmw/mwgui/confirmationdialog.hpp index ab52549ec9..2acefd54c1 100644 --- a/apps/openmw/mwgui/confirmationdialog.hpp +++ b/apps/openmw/mwgui/confirmationdialog.hpp @@ -10,7 +10,7 @@ namespace MWGui public: ConfirmationDialog(); void askForConfirmation(const std::string& message); - virtual bool exit(); + bool exit() override; typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 120573d590..e56cd170c8 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -30,7 +30,7 @@ namespace MWGui ConsoleInterpreterContext (Console& console, MWWorld::Ptr reference); - virtual void report (const std::string& message); + void report (const std::string& message) override; }; ConsoleInterpreterContext::ConsoleInterpreterContext (Console& console, diff --git a/apps/openmw/mwgui/console.hpp b/apps/openmw/mwgui/console.hpp index e431d18d17..52aa42f2af 100644 --- a/apps/openmw/mwgui/console.hpp +++ b/apps/openmw/mwgui/console.hpp @@ -39,9 +39,9 @@ namespace MWGui Console(int w, int h, bool consoleOnlyScripts); - virtual void onOpen(); + void onOpen() override; - void onResChange(int width, int height); + void onResChange(int width, int height) override; // Print a message to the console, in specified color. void print(const std::string &msg, const std::string& color = "#FFFFFF"); @@ -60,13 +60,13 @@ namespace MWGui void updateSelectedObjectPtr(const MWWorld::Ptr& currentPtr, const MWWorld::Ptr& newPtr); - void clear(); + void clear() override; - virtual void resetReference (); + void resetReference () override; protected: - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; private: @@ -86,10 +86,10 @@ namespace MWGui bool compile (const std::string& cmd, Compiler::Output& output); /// Report error to the user. - virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type); + void report (const std::string& message, const Compiler::TokenLoc& loc, Type type) override; /// Report a file related error - virtual void report (const std::string& message, Type type); + void report (const std::string& message, Type type) override; /// Write all valid identifiers and keywords into mNames and sort them. /// \note If mNames is not empty, this function is a no-op. diff --git a/apps/openmw/mwgui/container.hpp b/apps/openmw/mwgui/container.hpp index cf02d165dc..feda123fb7 100644 --- a/apps/openmw/mwgui/container.hpp +++ b/apps/openmw/mwgui/container.hpp @@ -33,13 +33,13 @@ namespace MWGui public: ContainerWindow(DragAndDrop* dragAndDrop); - void setPtr(const MWWorld::Ptr& container); - virtual void onClose(); - void clear() { resetReference(); } + void setPtr(const MWWorld::Ptr& container) override; + void onClose() override; + void clear() override { resetReference(); } - void onFrame(float dt) { checkReferenceAvailable(); } + void onFrame(float dt) override { checkReferenceAvailable(); } - virtual void resetReference(); + void resetReference() override; private: DragAndDrop* mDragAndDrop; @@ -64,7 +64,7 @@ namespace MWGui /// @return is taking the item allowed? bool onTakeItem(const ItemStack& item, int count); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; }; } #endif // CONTAINER_H diff --git a/apps/openmw/mwgui/containeritemmodel.hpp b/apps/openmw/mwgui/containeritemmodel.hpp index d09bd7def9..c54f113147 100644 --- a/apps/openmw/mwgui/containeritemmodel.hpp +++ b/apps/openmw/mwgui/containeritemmodel.hpp @@ -22,19 +22,19 @@ namespace MWGui ContainerItemModel (const MWWorld::Ptr& source); - virtual bool allowedToUseItems() const; + bool allowedToUseItems() const override; - virtual bool onDropItem(const MWWorld::Ptr &item, int count); - virtual bool onTakeItem(const MWWorld::Ptr &item, int count); + bool onDropItem(const MWWorld::Ptr &item, int count) override; + bool onTakeItem(const MWWorld::Ptr &item, int count) override; - virtual ItemStack getItem (ModelIndex index); - virtual ModelIndex getIndex (ItemStack item); - virtual size_t getItemCount(); + ItemStack getItem (ModelIndex index) override; + ModelIndex getIndex (ItemStack item) override; + size_t getItemCount() override; - virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true); - virtual void removeItem (const ItemStack& item, size_t count); + MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override; + void removeItem (const ItemStack& item, size_t count) override; - virtual void update(); + void update() override; private: std::vector> mItemSources; diff --git a/apps/openmw/mwgui/debugwindow.hpp b/apps/openmw/mwgui/debugwindow.hpp index af5b914ea2..33647c0789 100644 --- a/apps/openmw/mwgui/debugwindow.hpp +++ b/apps/openmw/mwgui/debugwindow.hpp @@ -11,7 +11,7 @@ namespace MWGui public: DebugWindow(); - void onFrame(float dt); + void onFrame(float dt) override; private: MyGUI::TabControl* mTabControl; diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 2527da3748..8517dfd96a 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -41,7 +41,7 @@ namespace MWGui } - void addResponse(const std::string& title, const std::string& text) + void addResponse(const std::string& title, const std::string& text) override { mWindow->addResponse(title, text, mNeedMargin); } diff --git a/apps/openmw/mwgui/dialogue.hpp b/apps/openmw/mwgui/dialogue.hpp index d9c26ef203..ed4c39afed 100644 --- a/apps/openmw/mwgui/dialogue.hpp +++ b/apps/openmw/mwgui/dialogue.hpp @@ -29,9 +29,9 @@ namespace MWGui public: PersuasionDialog(ResponseCallback* callback); - virtual void onOpen(); + void onOpen() override; - virtual MyGUI::Widget* getDefaultKeyFocus(); + MyGUI::Widget* getDefaultKeyFocus() override; private: std::unique_ptr mCallback; @@ -62,7 +62,7 @@ namespace MWGui EventHandle_TopicId eventTopicActivated; Topic(const std::string& id) : mTopicId(id) {} std::string mTopicId; - virtual void activated (); + void activated () override; }; struct Choice : Link @@ -71,14 +71,14 @@ namespace MWGui EventHandle_ChoiceId eventChoiceActivated; Choice(int id) : mChoiceId(id) {} int mChoiceId; - virtual void activated (); + void activated () override; }; struct Goodbye : Link { typedef MyGUI::delegates::CMultiDelegate0 Event_Activated; Event_Activated eventActivated; - virtual void activated (); + void activated () override; }; typedef MWDialogue::KeywordSearch KeywordSearchT; @@ -93,7 +93,7 @@ namespace MWGui struct Response : DialogueText { Response(const std::string& text, const std::string& title = "", bool needMargin = true); - virtual void write (BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map& topicLinks) const; + void write (BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map& topicLinks) const override; void addTopicLink (BookTypesetter::Ptr typesetter, intptr_t topicId, size_t begin, size_t end) const; std::string mTitle; bool mNeedMargin; @@ -102,7 +102,7 @@ namespace MWGui struct Message : DialogueText { Message(const std::string& text); - virtual void write (BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map& topicLinks) const; + void write (BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map& topicLinks) const override; }; class DialogueWindow: public WindowBase, public ReferenceInterface @@ -113,14 +113,14 @@ namespace MWGui void onTradeComplete(); - virtual bool exit(); + bool exit() override; // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; void notifyLinkClicked (TypesetBook::InteractiveId link); - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; void setKeywords(std::list keyWord); @@ -128,12 +128,12 @@ namespace MWGui void addMessageBox(const std::string& text); - void onFrame(float dt); - void clear() { resetReference(); } + void onFrame(float dt) override; + void clear() override { resetReference(); } void updateTopics(); - void onClose(); + void onClose() override; protected: void updateTopicsPane(); @@ -152,7 +152,7 @@ namespace MWGui void updateHistory(bool scrollbar=false); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; private: void updateDisposition(); diff --git a/apps/openmw/mwgui/enchantingdialog.hpp b/apps/openmw/mwgui/enchantingdialog.hpp index 4906de9199..3989ae076b 100644 --- a/apps/openmw/mwgui/enchantingdialog.hpp +++ b/apps/openmw/mwgui/enchantingdialog.hpp @@ -19,23 +19,23 @@ namespace MWGui EnchantingDialog(); virtual ~EnchantingDialog(); - virtual void onOpen(); + void onOpen() override; - void onFrame(float dt) { checkReferenceAvailable(); } - void clear() { resetReference(); } + void onFrame(float dt) override { checkReferenceAvailable(); } + void clear() override { resetReference(); } void setSoulGem (const MWWorld::Ptr& gem); void setItem (const MWWorld::Ptr& item); /// Actor Ptr: buy enchantment from this actor /// Soulgem Ptr: player self-enchant - void setPtr(const MWWorld::Ptr& ptr); + void setPtr(const MWWorld::Ptr& ptr) override; - virtual void resetReference(); + void resetReference() override; protected: - virtual void onReferenceUnavailable(); - virtual void notifyEffectsChanged (); + void onReferenceUnavailable() override; + void notifyEffectsChanged() override; void onCancelButtonClicked(MyGUI::Widget* sender); void onSelectItem (MyGUI::Widget* sender); diff --git a/apps/openmw/mwgui/formatting.hpp b/apps/openmw/mwgui/formatting.hpp index b16a4e57d3..d563514148 100644 --- a/apps/openmw/mwgui/formatting.hpp +++ b/apps/openmw/mwgui/formatting.hpp @@ -149,8 +149,8 @@ namespace MWGui public: TextElement(MyGUI::Widget * parent, Paginator & pag, const BlockStyle & blockStyle, const TextStyle & textStyle, const std::string & text); - virtual int getHeight(); - virtual int pageSplit(); + int getHeight() override; + int pageSplit() override; private: int currentFontHeight() const; TextStyle mTextStyle; @@ -162,8 +162,8 @@ namespace MWGui public: ImageElement(MyGUI::Widget * parent, Paginator & pag, const BlockStyle & blockStyle, const std::string & src, int width, int height); - virtual int getHeight(); - virtual int pageSplit(); + int getHeight() override; + int pageSplit() override; private: int mImageHeight; diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index fd0fcb7987..a4ab20fd68 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -37,8 +37,8 @@ namespace MWGui { public: WorldItemModel(float left, float top) : mLeft(left), mTop(top) {} - virtual ~WorldItemModel() {} - virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool /*allowAutoEquip*/) + virtual ~WorldItemModel() override {} + MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool /*allowAutoEquip*/) override { MWBase::World* world = MWBase::Environment::get().getWorld(); @@ -52,11 +52,11 @@ namespace MWGui return dropped; } - virtual void removeItem (const ItemStack& item, size_t count) { throw std::runtime_error("removeItem not implemented"); } - virtual ModelIndex getIndex (ItemStack item) { throw std::runtime_error("getIndex not implemented"); } - virtual void update() {} - virtual size_t getItemCount() { return 0; } - virtual ItemStack getItem (ModelIndex index) { throw std::runtime_error("getItem not implemented"); } + void removeItem (const ItemStack& item, size_t count) override { throw std::runtime_error("removeItem not implemented"); } + ModelIndex getIndex (ItemStack item) override { throw std::runtime_error("getIndex not implemented"); } + void update() override {} + size_t getItemCount() override { return 0; } + ItemStack getItem (ModelIndex index) override { throw std::runtime_error("getItem not implemented"); } private: // Where to drop the item diff --git a/apps/openmw/mwgui/hud.hpp b/apps/openmw/mwgui/hud.hpp index 15235fe917..8a89320d8c 100644 --- a/apps/openmw/mwgui/hud.hpp +++ b/apps/openmw/mwgui/hud.hpp @@ -112,8 +112,8 @@ namespace MWGui void onMapClicked(MyGUI::Widget* _sender); // LocalMapBase - virtual void customMarkerCreated(MyGUI::Widget* marker) override; - virtual void doorMarkerCreated(MyGUI::Widget* marker) override; + void customMarkerCreated(MyGUI::Widget* marker) override; + void doorMarkerCreated(MyGUI::Widget* marker) override; void updateEnemyHealthBar(); diff --git a/apps/openmw/mwgui/inventoryitemmodel.hpp b/apps/openmw/mwgui/inventoryitemmodel.hpp index d1fb88b6e4..30d17f3e6c 100644 --- a/apps/openmw/mwgui/inventoryitemmodel.hpp +++ b/apps/openmw/mwgui/inventoryitemmodel.hpp @@ -11,19 +11,19 @@ namespace MWGui public: InventoryItemModel (const MWWorld::Ptr& actor); - virtual ItemStack getItem (ModelIndex index); - virtual ModelIndex getIndex (ItemStack item); - virtual size_t getItemCount(); + ItemStack getItem (ModelIndex index) override; + ModelIndex getIndex (ItemStack item) override; + size_t getItemCount() override; - virtual bool onTakeItem(const MWWorld::Ptr &item, int count); + bool onTakeItem(const MWWorld::Ptr &item, int count) override; - virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true); - virtual void removeItem (const ItemStack& item, size_t count); + MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override; + void removeItem (const ItemStack& item, size_t count) override; /// Move items from this model to \a otherModel. - virtual MWWorld::Ptr moveItem (const ItemStack& item, size_t count, ItemModel* otherModel); + MWWorld::Ptr moveItem (const ItemStack& item, size_t count, ItemModel* otherModel) override; - virtual void update(); + void update() override; protected: MWWorld::Ptr mActor; diff --git a/apps/openmw/mwgui/inventorywindow.hpp b/apps/openmw/mwgui/inventorywindow.hpp index f2ab7f1eef..dc3ee9e0cb 100644 --- a/apps/openmw/mwgui/inventorywindow.hpp +++ b/apps/openmw/mwgui/inventorywindow.hpp @@ -35,12 +35,12 @@ namespace MWGui public: InventoryWindow(DragAndDrop* dragAndDrop, osg::Group* parent, Resource::ResourceSystem* resourceSystem); - virtual void onOpen(); + void onOpen() override; /// start trading, disables item drag&drop void setTrading(bool trading); - void onFrame(float dt); + void onFrame(float dt) override; void pickUpObject (MWWorld::Ptr object); @@ -56,7 +56,7 @@ namespace MWGui void updatePlayer(); - void clear(); + void clear() override; void useItem(const MWWorld::Ptr& ptr, bool force=false); @@ -66,7 +66,7 @@ namespace MWGui void cycle(bool next); protected: - virtual void onTitleDoubleClicked(); + void onTitleDoubleClicked() override; private: DragAndDrop* mDragAndDrop; @@ -123,7 +123,7 @@ namespace MWGui void onFilterChanged(MyGUI::Widget* _sender); void onNameFilterChanged(MyGUI::EditBox* _sender); void onAvatarClicked(MyGUI::Widget* _sender); - void onPinToggled(); + void onPinToggled() override; void updateEncumbranceBar(); void notifyContentChanged(); diff --git a/apps/openmw/mwgui/itemmodel.hpp b/apps/openmw/mwgui/itemmodel.hpp index 4d923bae34..e120dde0fa 100644 --- a/apps/openmw/mwgui/itemmodel.hpp +++ b/apps/openmw/mwgui/itemmodel.hpp @@ -88,15 +88,15 @@ namespace MWGui ProxyItemModel(); virtual ~ProxyItemModel(); - bool allowedToUseItems() const; + bool allowedToUseItems() const override; - virtual void onClose(); - virtual bool onDropItem(const MWWorld::Ptr &item, int count); - virtual bool onTakeItem(const MWWorld::Ptr &item, int count); + void onClose() override; + bool onDropItem(const MWWorld::Ptr &item, int count) override; + bool onTakeItem(const MWWorld::Ptr &item, int count) override; - virtual MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true); - virtual void removeItem (const ItemStack& item, size_t count); - virtual ModelIndex getIndex (ItemStack item); + MWWorld::Ptr copyItem (const ItemStack& item, size_t count, bool allowAutoEquip = true) override; + void removeItem (const ItemStack& item, size_t count) override; + ModelIndex getIndex (ItemStack item) override; /// @note Takes ownership of the passed pointer. void setSourceModel(ItemModel* sourceModel); diff --git a/apps/openmw/mwgui/itemselection.hpp b/apps/openmw/mwgui/itemselection.hpp index 07b6452a58..6132bac7af 100644 --- a/apps/openmw/mwgui/itemselection.hpp +++ b/apps/openmw/mwgui/itemselection.hpp @@ -21,7 +21,7 @@ namespace MWGui public: ItemSelectionDialog(const std::string& label); - virtual bool exit(); + bool exit() override; typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; typedef MyGUI::delegates::CMultiDelegate1 EventHandle_Item; diff --git a/apps/openmw/mwgui/jailscreen.hpp b/apps/openmw/mwgui/jailscreen.hpp index 36d19b5a96..871a861d77 100644 --- a/apps/openmw/mwgui/jailscreen.hpp +++ b/apps/openmw/mwgui/jailscreen.hpp @@ -12,9 +12,9 @@ namespace MWGui JailScreen(); void goToJail(int days); - void onFrame(float dt); + void onFrame(float dt) override; - bool exit() { return false; } + bool exit() override { return false; } private: int mDays; diff --git a/apps/openmw/mwgui/journalviewmodel.cpp b/apps/openmw/mwgui/journalviewmodel.cpp index 3621656bc3..426c3b4378 100644 --- a/apps/openmw/mwgui/journalviewmodel.cpp +++ b/apps/openmw/mwgui/journalviewmodel.cpp @@ -46,11 +46,11 @@ struct JournalViewModelImpl : JournalViewModel return Utf8Span (point, point + str.size ()); } - void load () + void load () override { } - void unload () + void unload () override { mKeywordSearch.clear (); mKeywordSearchLoaded = false; @@ -69,7 +69,7 @@ struct JournalViewModelImpl : JournalViewModel } } - bool isEmpty () const + bool isEmpty () const override { MWBase::Journal * journal = MWBase::Environment::get().getJournal(); @@ -141,14 +141,14 @@ struct JournalViewModelImpl : JournalViewModel } } - Utf8Span body () const + Utf8Span body () const override { ensureLoaded (); return toUtf8Span (utf8text); } - void visitSpans (std::function < void (TopicId, size_t, size_t)> visitor) const + void visitSpans (std::function < void (TopicId, size_t, size_t)> visitor) const override { ensureLoaded (); mModel->ensureKeyWordSearchLoaded (); @@ -192,7 +192,7 @@ struct JournalViewModelImpl : JournalViewModel }; - void visitQuestNames (bool active_only, std::function visitor) const + void visitQuestNames (bool active_only, std::function visitor) const override { MWBase::Journal * journal = MWBase::Environment::get ().getJournal (); @@ -242,12 +242,12 @@ struct JournalViewModelImpl : JournalViewModel BaseEntry (model, itr) {} - std::string getText () const + std::string getText () const override { return itr->getText(); } - Utf8Span timestamp () const + Utf8Span timestamp () const override { if (timestamp_buffer.empty ()) { @@ -267,7 +267,7 @@ struct JournalViewModelImpl : JournalViewModel } }; - void visitJournalEntries (const std::string& questName, std::function visitor) const + void visitJournalEntries (const std::string& questName, std::function visitor) const override { MWBase::Journal * journal = MWBase::Environment::get().getJournal(); @@ -300,13 +300,13 @@ struct JournalViewModelImpl : JournalViewModel } } - void visitTopicName (TopicId topicId, std::function visitor) const + void visitTopicName (TopicId topicId, std::function visitor) const override { MWDialogue::Topic const & topic = * reinterpret_cast (topicId); visitor (toUtf8Span (topic.getName())); } - void visitTopicNamesStartingWith (Utf8Stream::UnicodeChar character, std::function < void (const std::string&) > visitor) const + void visitTopicNamesStartingWith (Utf8Stream::UnicodeChar character, std::function < void (const std::string&) > visitor) const override { MWBase::Journal * journal = MWBase::Environment::get().getJournal(); @@ -330,19 +330,19 @@ struct JournalViewModelImpl : JournalViewModel BaseEntry (model, itr), mTopic (topic) {} - std::string getText () const + std::string getText () const override { return itr->getText(); } - Utf8Span source () const + Utf8Span source () const override { return toUtf8Span (itr->mActorName); } }; - void visitTopicEntries (TopicId topicId, std::function visitor) const + void visitTopicEntries (TopicId topicId, std::function visitor) const override { typedef MWDialogue::Topic::TEntryIter iterator_t; diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index 43e7edf1e4..1474becf08 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -226,7 +226,7 @@ namespace mTopicsMode = false; } - void onOpen() + void onOpen() override { if (!MWBase::Environment::get().getWindowManager ()->getJournalAllowed ()) { @@ -257,7 +257,7 @@ namespace MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(getWidget(CloseBTN)); } - void onClose() + void onClose() override { mModel->unload (); @@ -270,7 +270,7 @@ namespace mTopicIndexBook.reset (); } - void setVisible (bool newValue) + void setVisible (bool newValue) override { WindowBase::setVisible (newValue); } diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 8cc0a5ef3d..c18e6e4c08 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -21,10 +21,10 @@ namespace MWGui static JournalWindow * create (std::shared_ptr Model, bool questList, ToUTF8::FromType encoding); /// destroy this instance of the JournalWindow implementation - virtual ~JournalWindow () {}; + virtual ~JournalWindow () {} /// show/hide the journal window - virtual void setVisible (bool newValue) = 0; + void setVisible (bool newValue) override = 0; }; } diff --git a/apps/openmw/mwgui/keyboardnavigation.hpp b/apps/openmw/mwgui/keyboardnavigation.hpp index 2a094a2df2..d5159c24a0 100644 --- a/apps/openmw/mwgui/keyboardnavigation.hpp +++ b/apps/openmw/mwgui/keyboardnavigation.hpp @@ -19,7 +19,7 @@ namespace MWGui void saveFocus(int mode); void restoreFocus(int mode); - void _unlinkWidget(MyGUI::Widget* widget); + void _unlinkWidget(MyGUI::Widget* widget) override; void onFrame(); diff --git a/apps/openmw/mwgui/levelupdialog.hpp b/apps/openmw/mwgui/levelupdialog.hpp index 36810665e0..6c9182609e 100644 --- a/apps/openmw/mwgui/levelupdialog.hpp +++ b/apps/openmw/mwgui/levelupdialog.hpp @@ -11,7 +11,7 @@ namespace MWGui public: LevelupDialog(); - virtual void onOpen(); + void onOpen() override; private: MyGUI::Button* mOkButton; diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index 521b88f296..cd0384bb02 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -141,7 +141,7 @@ namespace MWGui { } - virtual void operator () (osg::RenderInfo& renderInfo) const + void operator () (osg::RenderInfo& renderInfo) const override { if (!oneshot) return; @@ -159,7 +159,7 @@ namespace MWGui class DontComputeBoundCallback : public osg::Node::ComputeBoundingSphereCallback { public: - virtual osg::BoundingSphere computeBound(const osg::Node&) const { return osg::BoundingSphere(); } + osg::BoundingSphere computeBound(const osg::Node&) const override { return osg::BoundingSphere(); } }; void LoadingScreen::loadingOn(bool visible) diff --git a/apps/openmw/mwgui/loadingscreen.hpp b/apps/openmw/mwgui/loadingscreen.hpp index b3e2534ce3..2577827aaa 100644 --- a/apps/openmw/mwgui/loadingscreen.hpp +++ b/apps/openmw/mwgui/loadingscreen.hpp @@ -36,14 +36,14 @@ namespace MWGui virtual ~LoadingScreen(); /// Overridden from Loading::Listener, see the Loading::Listener documentation for usage details - virtual void setLabel (const std::string& label, bool important, bool center); - virtual void loadingOn(bool visible=true); - virtual void loadingOff(); - virtual void setProgressRange (size_t range); - virtual void setProgress (size_t value); - virtual void increaseProgress (size_t increase=1); - - virtual void setVisible(bool visible); + void setLabel (const std::string& label, bool important, bool center) override; + void loadingOn(bool visible=true) override; + void loadingOff() override; + void setProgressRange (size_t range) override; + void setProgress (size_t value) override; + void increaseProgress (size_t increase=1) override; + + void setVisible(bool visible) override; double getTargetFrameRate() const; diff --git a/apps/openmw/mwgui/mainmenu.hpp b/apps/openmw/mwgui/mainmenu.hpp index 82553d22e4..560eb93dcc 100644 --- a/apps/openmw/mwgui/mainmenu.hpp +++ b/apps/openmw/mwgui/mainmenu.hpp @@ -32,13 +32,13 @@ namespace MWGui MainMenu(int w, int h, const VFS::Manager* vfs, const std::string& versionDescription); ~MainMenu(); - void onResChange(int w, int h); + void onResChange(int w, int h) override; - virtual void setVisible (bool visible); + void setVisible (bool visible) override; - void onFrame(float dt); + void onFrame(float dt) override; - bool exit(); + bool exit() override; private: const VFS::Manager* mVFS; diff --git a/apps/openmw/mwgui/mapwindow.hpp b/apps/openmw/mwgui/mapwindow.hpp index 7b86f76179..7e8092f289 100644 --- a/apps/openmw/mwgui/mapwindow.hpp +++ b/apps/openmw/mwgui/mapwindow.hpp @@ -179,7 +179,7 @@ namespace MWGui public: EditNoteDialog(); - virtual void onOpen(); + void onOpen() override; void showDeleteButton(bool show); bool getDeleteButtonShown(); @@ -210,8 +210,8 @@ namespace MWGui void setCellName(const std::string& cellName); - virtual void setAlpha(float alpha); - void setVisible(bool visible); + void setAlpha(float alpha) override; + void setVisible(bool visible) override; void renderGlobalMap(); @@ -227,14 +227,14 @@ namespace MWGui void ensureGlobalMapLoaded(); - virtual void onOpen(); + void onOpen() override; - void onFrame(float dt); + void onFrame(float dt) override; - virtual void updateCustomMarkers(); + void updateCustomMarkers() override; /// Clear all savegame-specific data - void clear(); + void clear() override; void write (ESM::ESMWriter& writer, Loading::Listener& progress); void readRecord (ESM::ESMReader& reader, uint32_t type); @@ -280,13 +280,13 @@ namespace MWGui EditNoteDialog mEditNoteDialog; ESM::CustomMarker mEditingMarker; - virtual void onPinToggled(); - virtual void onTitleDoubleClicked(); + void onPinToggled() override; + void onTitleDoubleClicked() override; - virtual void doorMarkerCreated(MyGUI::Widget* marker); - virtual void customMarkerCreated(MyGUI::Widget *marker); + void doorMarkerCreated(MyGUI::Widget* marker) override; + void customMarkerCreated(MyGUI::Widget *marker) override; - virtual void notifyPlayerUpdate(); + void notifyPlayerUpdate() override; }; } diff --git a/apps/openmw/mwgui/merchantrepair.hpp b/apps/openmw/mwgui/merchantrepair.hpp index 26887ae2ca..f5276d7f6e 100644 --- a/apps/openmw/mwgui/merchantrepair.hpp +++ b/apps/openmw/mwgui/merchantrepair.hpp @@ -12,9 +12,9 @@ class MerchantRepair : public WindowBase public: MerchantRepair(); - virtual void onOpen(); + void onOpen() override; - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; private: MyGUI::ScrollView* mList; diff --git a/apps/openmw/mwgui/messagebox.hpp b/apps/openmw/mwgui/messagebox.hpp index e4e4b743c2..aeb1b83002 100644 --- a/apps/openmw/mwgui/messagebox.hpp +++ b/apps/openmw/mwgui/messagebox.hpp @@ -83,7 +83,7 @@ namespace MWGui MyGUI::Widget* getDefaultKeyFocus() override; - virtual bool exit() override { return false; } + bool exit() override { return false; } bool mMarkedToDelete; diff --git a/apps/openmw/mwgui/pickpocketitemmodel.hpp b/apps/openmw/mwgui/pickpocketitemmodel.hpp index 83caf2ffd4..e28af73d78 100644 --- a/apps/openmw/mwgui/pickpocketitemmodel.hpp +++ b/apps/openmw/mwgui/pickpocketitemmodel.hpp @@ -12,14 +12,14 @@ namespace MWGui public: PickpocketItemModel (const MWWorld::Ptr& thief, ItemModel* sourceModel, bool hideItems=true); - virtual bool allowedToUseItems() const; - virtual ItemStack getItem (ModelIndex index); - virtual size_t getItemCount(); - virtual void update(); - virtual void removeItem (const ItemStack& item, size_t count); - virtual void onClose(); - virtual bool onDropItem(const MWWorld::Ptr &item, int count); - virtual bool onTakeItem(const MWWorld::Ptr &item, int count); + bool allowedToUseItems() const override; + ItemStack getItem (ModelIndex index) override; + size_t getItemCount() override; + void update() override; + void removeItem (const ItemStack& item, size_t count) override; + void onClose() override; + bool onDropItem(const MWWorld::Ptr &item, int count) override; + bool onTakeItem(const MWWorld::Ptr &item, int count) override; protected: MWWorld::Ptr mActor; diff --git a/apps/openmw/mwgui/quickkeysmenu.hpp b/apps/openmw/mwgui/quickkeysmenu.hpp index 431e847cbb..d0e9509798 100644 --- a/apps/openmw/mwgui/quickkeysmenu.hpp +++ b/apps/openmw/mwgui/quickkeysmenu.hpp @@ -22,7 +22,7 @@ namespace MWGui QuickKeysMenu(); ~QuickKeysMenu(); - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } void onItemButtonClicked(MyGUI::Widget* sender); void onMagicButtonClicked(MyGUI::Widget* sender); @@ -34,7 +34,7 @@ namespace MWGui void onAssignMagicItem (MWWorld::Ptr item); void onAssignMagic (const std::string& spellId); void onAssignMagicCancel (); - void onOpen(); + void onOpen() override; void activateQuickKey(int index); void updateActivatedQuickKey(); @@ -51,7 +51,7 @@ namespace MWGui void write (ESM::ESMWriter& writer); void readRecord (ESM::ESMReader& reader, uint32_t type); - void clear(); + void clear() override; private: @@ -102,8 +102,8 @@ namespace MWGui public: MagicSelectionDialog(QuickKeysMenu* parent); - virtual void onOpen(); - virtual bool exit(); + void onOpen() override; + bool exit() override; private: MyGUI::Button* mCancelButton; diff --git a/apps/openmw/mwgui/race.hpp b/apps/openmw/mwgui/race.hpp index 0fa4fdec5c..0299c2a1ac 100644 --- a/apps/openmw/mwgui/race.hpp +++ b/apps/openmw/mwgui/race.hpp @@ -53,10 +53,10 @@ namespace MWGui void setGender(Gender gender) { mGenderIndex = gender == GM_Male ? 0 : 1; } void setNextButtonShow(bool shown); - virtual void onOpen(); - virtual void onClose(); + void onOpen() override; + void onClose() override; - bool exit() { return false; } + bool exit() override { return false; } // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; diff --git a/apps/openmw/mwgui/recharge.hpp b/apps/openmw/mwgui/recharge.hpp index f4602ce302..3d469bac56 100644 --- a/apps/openmw/mwgui/recharge.hpp +++ b/apps/openmw/mwgui/recharge.hpp @@ -22,9 +22,9 @@ class Recharge : public WindowBase public: Recharge(); - virtual void onOpen(); + void onOpen() override; - void setPtr (const MWWorld::Ptr& gem); + void setPtr (const MWWorld::Ptr& gem) override; protected: ItemChargeView* mBox; diff --git a/apps/openmw/mwgui/repair.hpp b/apps/openmw/mwgui/repair.hpp index f31625095f..594ad28235 100644 --- a/apps/openmw/mwgui/repair.hpp +++ b/apps/openmw/mwgui/repair.hpp @@ -19,9 +19,9 @@ class Repair : public WindowBase public: Repair(); - virtual void onOpen(); + void onOpen() override; - void setPtr (const MWWorld::Ptr& item); + void setPtr (const MWWorld::Ptr& item) override; protected: ItemChargeView* mRepairBox; diff --git a/apps/openmw/mwgui/review.hpp b/apps/openmw/mwgui/review.hpp index f46ad280d5..bd17c7afb3 100644 --- a/apps/openmw/mwgui/review.hpp +++ b/apps/openmw/mwgui/review.hpp @@ -31,7 +31,7 @@ namespace MWGui ReviewDialog(); - bool exit() { return false; } + bool exit() override { return false; } void setPlayerName(const std::string &name); void setRace(const std::string &raceId); @@ -47,9 +47,9 @@ namespace MWGui void configureSkills(const SkillList& major, const SkillList& minor); void setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::SkillValue& value); - virtual void onOpen(); + void onOpen() override; - void onFrame(float duration); + void onFrame(float duration) override; // Events typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void; diff --git a/apps/openmw/mwgui/savegamedialog.hpp b/apps/openmw/mwgui/savegamedialog.hpp index e2c41af708..c22d86fd11 100644 --- a/apps/openmw/mwgui/savegamedialog.hpp +++ b/apps/openmw/mwgui/savegamedialog.hpp @@ -19,8 +19,8 @@ namespace MWGui public: SaveGameDialog(); - virtual void onOpen(); - virtual void onClose(); + void onOpen() override; + void onClose() override; void setLoadOrSave(bool load); diff --git a/apps/openmw/mwgui/screenfader.hpp b/apps/openmw/mwgui/screenfader.hpp index aa17ed4e8d..8eb8a68591 100644 --- a/apps/openmw/mwgui/screenfader.hpp +++ b/apps/openmw/mwgui/screenfader.hpp @@ -45,7 +45,7 @@ namespace MWGui void fadeOut(const float time, float delay=0); void fadeTo(const int percent, const float time, float delay=0); - void clear(); + void clear() override; void setFactor (float factor); void setRepeat(bool repeat); diff --git a/apps/openmw/mwgui/scrollwindow.hpp b/apps/openmw/mwgui/scrollwindow.hpp index 7f2a7a281f..8a1e323ab1 100644 --- a/apps/openmw/mwgui/scrollwindow.hpp +++ b/apps/openmw/mwgui/scrollwindow.hpp @@ -17,10 +17,10 @@ namespace MWGui public: ScrollWindow (); - void setPtr (const MWWorld::Ptr& scroll); + void setPtr (const MWWorld::Ptr& scroll) override; void setInventoryAllowed(bool allowed); - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } protected: void onCloseButtonClicked (MyGUI::Widget* _sender); diff --git a/apps/openmw/mwgui/settingswindow.hpp b/apps/openmw/mwgui/settingswindow.hpp index 37d671a5aa..6f25dd1143 100644 --- a/apps/openmw/mwgui/settingswindow.hpp +++ b/apps/openmw/mwgui/settingswindow.hpp @@ -15,11 +15,11 @@ namespace MWGui public: SettingsWindow(); - virtual void onOpen(); + void onOpen() override; void updateControlsBox(); - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } protected: MyGUI::TabControl* mSettingsTab; diff --git a/apps/openmw/mwgui/sortfilteritemmodel.hpp b/apps/openmw/mwgui/sortfilteritemmodel.hpp index 3e616875e7..fa70a0edd7 100644 --- a/apps/openmw/mwgui/sortfilteritemmodel.hpp +++ b/apps/openmw/mwgui/sortfilteritemmodel.hpp @@ -11,13 +11,13 @@ namespace MWGui public: SortFilterItemModel (ItemModel* sourceModel); - virtual void update(); + void update() override; bool filterAccepts (const ItemStack& item); - bool allowedToUseItems() const; - virtual ItemStack getItem (ModelIndex index); - virtual size_t getItemCount(); + bool allowedToUseItems() const override; + ItemStack getItem (ModelIndex index) override; + size_t getItemCount() override; /// Dragged items are not displayed. void addDragItem (const MWWorld::Ptr& dragItem, size_t count); @@ -31,9 +31,9 @@ namespace MWGui /// Use ItemStack::Type for sorting? void setSortByType(bool sort) { mSortByType = sort; } - void onClose(); - bool onDropItem(const MWWorld::Ptr &item, int count); - bool onTakeItem(const MWWorld::Ptr &item, int count); + void onClose() override; + bool onDropItem(const MWWorld::Ptr &item, int count) override; + bool onTakeItem(const MWWorld::Ptr &item, int count) override; static const int Category_Weapon = (1<<1); static const int Category_Apparel = (1<<2); diff --git a/apps/openmw/mwgui/spellbuyingwindow.hpp b/apps/openmw/mwgui/spellbuyingwindow.hpp index c68ec24830..622548c959 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.hpp +++ b/apps/openmw/mwgui/spellbuyingwindow.hpp @@ -27,13 +27,13 @@ namespace MWGui public: SpellBuyingWindow(); - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; void setPtr(const MWWorld::Ptr& actor, int startOffset); - void onFrame(float dt) { checkReferenceAvailable(); } - void clear() { resetReference(); } + void onFrame(float dt) override { checkReferenceAvailable(); } + void clear() override { resetReference(); } - void onResChange(int, int) { center(); } + void onResChange(int, int) override { center(); } protected: MyGUI::Button* mCancelButton; @@ -52,7 +52,7 @@ namespace MWGui void updateLabels(); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; bool playerHasSpell (const std::string& id); diff --git a/apps/openmw/mwgui/spellcreationdialog.hpp b/apps/openmw/mwgui/spellcreationdialog.hpp index ec90fa3cec..73352ac238 100644 --- a/apps/openmw/mwgui/spellcreationdialog.hpp +++ b/apps/openmw/mwgui/spellcreationdialog.hpp @@ -23,8 +23,8 @@ namespace MWGui public: EditEffectDialog(); - virtual void onOpen(); - virtual bool exit(); + void onOpen() override; + bool exit() override; void setConstantEffect(bool constant); @@ -150,21 +150,21 @@ namespace MWGui public: SpellCreationDialog(); - virtual void onOpen(); - void clear() { resetReference(); } + void onOpen() override; + void clear() override { resetReference(); } - void onFrame(float dt) { checkReferenceAvailable(); } + void onFrame(float dt) override { checkReferenceAvailable(); } - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; protected: - virtual void onReferenceUnavailable (); + void onReferenceUnavailable() override; void onCancelButtonClicked (MyGUI::Widget* sender); void onBuyButtonClicked (MyGUI::Widget* sender); void onAccept(MyGUI::EditBox* sender); - virtual void notifyEffectsChanged (); + void notifyEffectsChanged() override; MyGUI::EditBox* mNameEdit; MyGUI::TextBox* mMagickaCost; diff --git a/apps/openmw/mwgui/spellicons.hpp b/apps/openmw/mwgui/spellicons.hpp index 67351688f2..b6aa49e69e 100644 --- a/apps/openmw/mwgui/spellicons.hpp +++ b/apps/openmw/mwgui/spellicons.hpp @@ -46,9 +46,9 @@ namespace MWGui virtual ~EffectSourceVisitor() {} - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1); + float magnitude, float remainingTime = -1, float totalTime = -1) override; }; class SpellIcons diff --git a/apps/openmw/mwgui/spellwindow.hpp b/apps/openmw/mwgui/spellwindow.hpp index 01a9c7392f..cf5e88f8e0 100644 --- a/apps/openmw/mwgui/spellwindow.hpp +++ b/apps/openmw/mwgui/spellwindow.hpp @@ -19,7 +19,7 @@ namespace MWGui void updateSpells(); - void onFrame(float dt); + void onFrame(float dt) override; /// Cycle to next/previous spell void cycle(bool next); @@ -37,9 +37,9 @@ namespace MWGui void onDeleteSpellAccept(); void askDeleteSpell(const std::string& spellId); - virtual void onPinToggled(); - virtual void onTitleDoubleClicked(); - virtual void onOpen(); + void onPinToggled() override; + void onTitleDoubleClicked() override; + void onOpen() override; SpellView* mSpellView; SpellIcons* mSpellIcons; diff --git a/apps/openmw/mwgui/statswindow.hpp b/apps/openmw/mwgui/statswindow.hpp index 1b6c607932..24f302580e 100644 --- a/apps/openmw/mwgui/statswindow.hpp +++ b/apps/openmw/mwgui/statswindow.hpp @@ -35,7 +35,7 @@ namespace MWGui void setBounty (int bounty) { if (bounty != mBounty) mChanged = true; this->mBounty = bounty; } void updateSkillArea(); - virtual void onOpen() override { onWindowResize(mMainWidget->castType()); } + void onOpen() override { onWindowResize(mMainWidget->castType()); } private: void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); @@ -70,8 +70,8 @@ namespace MWGui const int mMinFullWidth; protected: - virtual void onPinToggled() override; - virtual void onTitleDoubleClicked() override; + void onPinToggled() override; + void onTitleDoubleClicked() override; }; } #endif diff --git a/apps/openmw/mwgui/textinput.hpp b/apps/openmw/mwgui/textinput.hpp index 56c6632e14..84d9d032da 100644 --- a/apps/openmw/mwgui/textinput.hpp +++ b/apps/openmw/mwgui/textinput.hpp @@ -20,9 +20,9 @@ namespace MWGui void setNextButtonShow(bool shown); void setTextLabel(const std::string &label); - virtual void onOpen(); + void onOpen() override; - bool exit() { return false; } + bool exit() override { return false; } /** Event : Dialog finished, OK button clicked.\n signature : void method()\n diff --git a/apps/openmw/mwgui/tradeitemmodel.hpp b/apps/openmw/mwgui/tradeitemmodel.hpp index e349c225ab..53b616aeda 100644 --- a/apps/openmw/mwgui/tradeitemmodel.hpp +++ b/apps/openmw/mwgui/tradeitemmodel.hpp @@ -15,12 +15,12 @@ namespace MWGui public: TradeItemModel (ItemModel* sourceModel, const MWWorld::Ptr& merchant); - bool allowedToUseItems() const; + bool allowedToUseItems() const override; - virtual ItemStack getItem (ModelIndex index); - virtual size_t getItemCount(); + ItemStack getItem (ModelIndex index) override; + size_t getItemCount() override; - virtual void update(); + void update() override; void borrowItemFromUs (ModelIndex itemIndex, size_t count); diff --git a/apps/openmw/mwgui/tradewindow.hpp b/apps/openmw/mwgui/tradewindow.hpp index b211c6d09e..f82d7b0f72 100644 --- a/apps/openmw/mwgui/tradewindow.hpp +++ b/apps/openmw/mwgui/tradewindow.hpp @@ -27,20 +27,20 @@ namespace MWGui public: TradeWindow(); - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; - virtual void onClose() override; - void onFrame(float dt); - void clear() { resetReference(); } + void onClose() override; + void onFrame(float dt) override; + void clear() override { resetReference(); } void borrowItem (int index, size_t count); void returnItem (int index, size_t count); int getMerchantServices(); - virtual bool exit(); + bool exit() override; - virtual void resetReference(); + void resetReference() override; typedef MyGUI::delegates::CMultiDelegate0 EventHandle_TradeDone; EventHandle_TradeDone eventTradeDone; @@ -109,7 +109,7 @@ namespace MWGui void updateLabels(); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; int getMerchantGold(); }; diff --git a/apps/openmw/mwgui/trainingwindow.hpp b/apps/openmw/mwgui/trainingwindow.hpp index 955615516f..57fdd323a4 100644 --- a/apps/openmw/mwgui/trainingwindow.hpp +++ b/apps/openmw/mwgui/trainingwindow.hpp @@ -19,20 +19,20 @@ namespace MWGui public: TrainingWindow(); - virtual void onOpen(); + void onOpen() override; - bool exit(); + bool exit() override; - void setPtr(const MWWorld::Ptr& actor); + void setPtr(const MWWorld::Ptr& actor) override; - void onFrame(float dt); + void onFrame(float dt) override; WindowBase* getProgressBar() { return &mProgressBar; } - void clear() { resetReference(); } + void clear() override { resetReference(); } protected: - virtual void onReferenceUnavailable (); + void onReferenceUnavailable() override; void onCancelButtonClicked (MyGUI::Widget* sender); void onTrainingSelected(MyGUI::Widget* sender); diff --git a/apps/openmw/mwgui/travelwindow.hpp b/apps/openmw/mwgui/travelwindow.hpp index dcf0b77272..962d17161d 100644 --- a/apps/openmw/mwgui/travelwindow.hpp +++ b/apps/openmw/mwgui/travelwindow.hpp @@ -24,7 +24,7 @@ namespace MWGui public: TravelWindow(); - void setPtr (const MWWorld::Ptr& actor); + void setPtr (const MWWorld::Ptr& actor) override; protected: MyGUI::Button* mCancelButton; @@ -43,7 +43,7 @@ namespace MWGui void updateLabels(); - virtual void onReferenceUnavailable(); + void onReferenceUnavailable() override; }; } diff --git a/apps/openmw/mwgui/waitdialog.hpp b/apps/openmw/mwgui/waitdialog.hpp index 2aecb002f8..bf84e7e819 100644 --- a/apps/openmw/mwgui/waitdialog.hpp +++ b/apps/openmw/mwgui/waitdialog.hpp @@ -13,7 +13,7 @@ namespace MWGui public: WaitDialogProgressBar(); - virtual void onOpen(); + void onOpen() override; void setProgress(int cur, int total); @@ -27,15 +27,15 @@ namespace MWGui public: WaitDialog(); - void setPtr(const MWWorld::Ptr &ptr); + void setPtr(const MWWorld::Ptr &ptr) override; - virtual void onOpen(); + void onOpen() override; - virtual bool exit(); + bool exit() override; - virtual void clear(); + void clear() override; - void onFrame(float dt); + void onFrame(float dt) override; bool getSleeping() { return mTimeAdvancer.isRunning() && mSleeping; } void wakeUp(); diff --git a/apps/openmw/mwgui/windowbase.hpp b/apps/openmw/mwgui/windowbase.hpp index a729a79209..8afb2321e8 100644 --- a/apps/openmw/mwgui/windowbase.hpp +++ b/apps/openmw/mwgui/windowbase.hpp @@ -41,7 +41,7 @@ namespace MWGui /// Gracefully exits the window virtual bool exit() {return true;} /// Sets the visibility of the window - virtual void setVisible(bool visible); + void setVisible(bool visible) override; /// Returns the visibility state of the window bool isVisible(); @@ -67,9 +67,9 @@ namespace MWGui { public: WindowModal(const std::string& parLayout); - virtual void onOpen() override; - virtual void onClose() override; - virtual bool exit() override {return true;} + void onOpen() override; + void onClose() override; + bool exit() override {return true;} }; /// A window that cannot be the target of a drag&drop action. diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index 67a16f516f..cc1a1b6944 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -141,136 +141,136 @@ namespace MWGui void setStore (const MWWorld::ESMStore& store); void initUI(); - virtual void loadUserFonts(); + void loadUserFonts() override; - virtual Loading::Listener* getLoadingScreen(); + Loading::Listener* getLoadingScreen() override; /// @note This method will block until the video finishes playing /// (and will continually update the window while doing so) - virtual void playVideo(const std::string& name, bool allowSkipping); + void playVideo(const std::string& name, bool allowSkipping) override; /// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this. - virtual void setKeyFocusWidget (MyGUI::Widget* widget); + void setKeyFocusWidget (MyGUI::Widget* widget) override; - virtual void setNewGame(bool newgame); + void setNewGame(bool newgame) override; - virtual void pushGuiMode(GuiMode mode, const MWWorld::Ptr& arg); - virtual void pushGuiMode (GuiMode mode); - virtual void popGuiMode(bool noSound=false); - virtual void removeGuiMode(GuiMode mode, bool noSound=false); ///< can be anywhere in the stack + void pushGuiMode(GuiMode mode, const MWWorld::Ptr& arg) override; + void pushGuiMode (GuiMode mode) override; + void popGuiMode(bool noSound=false) override; + void removeGuiMode(GuiMode mode, bool noSound=false) override; ///< can be anywhere in the stack - virtual void goToJail(int days); + void goToJail(int days) override; - virtual GuiMode getMode() const; - virtual bool containsMode(GuiMode mode) const; + GuiMode getMode() const override; + bool containsMode(GuiMode mode) const override; - virtual bool isGuiMode() const; + bool isGuiMode() const override; - virtual bool isConsoleMode() const; + bool isConsoleMode() const override; - virtual void toggleVisible(GuiWindow wnd); + void toggleVisible(GuiWindow wnd) override; - virtual void forceHide(MWGui::GuiWindow wnd); - virtual void unsetForceHide(MWGui::GuiWindow wnd); + void forceHide(MWGui::GuiWindow wnd) override; + void unsetForceHide(MWGui::GuiWindow wnd) override; /// Disallow all inventory mode windows - virtual void disallowAll(); + void disallowAll() override; /// Allow one or more windows - virtual void allow(GuiWindow wnd); + void allow(GuiWindow wnd) override; - virtual bool isAllowed(GuiWindow wnd) const; + bool isAllowed(GuiWindow wnd) const override; /// \todo investigate, if we really need to expose every single lousy UI element to the outside world - virtual MWGui::InventoryWindow* getInventoryWindow(); - virtual MWGui::CountDialog* getCountDialog(); - virtual MWGui::ConfirmationDialog* getConfirmationDialog(); - virtual MWGui::TradeWindow* getTradeWindow(); + MWGui::InventoryWindow* getInventoryWindow() override; + MWGui::CountDialog* getCountDialog() override; + MWGui::ConfirmationDialog* getConfirmationDialog() override; + MWGui::TradeWindow* getTradeWindow() override; /// Make the player use an item, while updating GUI state accordingly - virtual void useItem(const MWWorld::Ptr& item, bool bypassBeastRestrictions=false); + void useItem(const MWWorld::Ptr& item, bool bypassBeastRestrictions=false) override; - virtual void updateSpellWindow(); + void updateSpellWindow() override; - virtual void setConsoleSelectedObject(const MWWorld::Ptr& object); + void setConsoleSelectedObject(const MWWorld::Ptr& object) override; /// Set time left for the player to start drowning (update the drowning bar) /// @param time time left to start drowning /// @param maxTime how long we can be underwater (in total) until drowning starts - virtual void setDrowningTimeLeft (float time, float maxTime); + void setDrowningTimeLeft (float time, float maxTime) override; - virtual void changeCell(const MWWorld::CellStore* cell); ///< change the active cell + void changeCell(const MWWorld::CellStore* cell) override; ///< change the active cell - virtual void setFocusObject(const MWWorld::Ptr& focus); - virtual void setFocusObjectScreenCoords(float min_x, float min_y, float max_x, float max_y); + void setFocusObject(const MWWorld::Ptr& focus) override; + void setFocusObjectScreenCoords(float min_x, float min_y, float max_x, float max_y) override; - virtual void getMousePosition(int &x, int &y); - virtual void getMousePosition(float &x, float &y); - virtual void setDragDrop(bool dragDrop); - virtual bool getWorldMouseOver(); + void getMousePosition(int &x, int &y) override; + void getMousePosition(float &x, float &y) override; + void setDragDrop(bool dragDrop) override; + bool getWorldMouseOver() override; - virtual bool toggleFogOfWar(); - virtual bool toggleFullHelp(); ///< show extra info in item tooltips (owner, script) - virtual bool getFullHelp() const; + bool toggleFogOfWar() override; + bool toggleFullHelp() override; ///< show extra info in item tooltips (owner, script) + bool getFullHelp() const override; - virtual void setActiveMap(int x, int y, bool interior); + void setActiveMap(int x, int y, bool interior) override; ///< set the indices of the map texture that should be used /// sets the visibility of the drowning bar - virtual void setDrowningBarVisibility(bool visible); + void setDrowningBarVisibility(bool visible) override; // sets the visibility of the hud health/magicka/stamina bars - virtual void setHMSVisibility(bool visible); + void setHMSVisibility(bool visible) override; // sets the visibility of the hud minimap - virtual void setMinimapVisibility(bool visible); - virtual void setWeaponVisibility(bool visible); - virtual void setSpellVisibility(bool visible); - virtual void setSneakVisibility(bool visible); + void setMinimapVisibility(bool visible) override; + void setWeaponVisibility(bool visible) override; + void setSpellVisibility(bool visible) override; + void setSneakVisibility(bool visible) override; /// activate selected quick key - virtual void activateQuickKey (int index); + void activateQuickKey (int index) override; /// update activated quick key state (if action executing was delayed for some reason) - virtual void updateActivatedQuickKey (); + void updateActivatedQuickKey () override; - virtual std::string getSelectedSpell() { return mSelectedSpell; } - virtual void setSelectedSpell(const std::string& spellId, int successChancePercent); - virtual void setSelectedEnchantItem(const MWWorld::Ptr& item); - virtual const MWWorld::Ptr& getSelectedEnchantItem() const; - virtual void setSelectedWeapon(const MWWorld::Ptr& item); - virtual const MWWorld::Ptr& getSelectedWeapon() const; - virtual int getFontHeight() const; - virtual void unsetSelectedSpell(); - virtual void unsetSelectedWeapon(); + std::string getSelectedSpell() override { return mSelectedSpell; } + void setSelectedSpell(const std::string& spellId, int successChancePercent) override; + void setSelectedEnchantItem(const MWWorld::Ptr& item) override; + const MWWorld::Ptr& getSelectedEnchantItem() const override; + void setSelectedWeapon(const MWWorld::Ptr& item) override; + const MWWorld::Ptr& getSelectedWeapon() const override; + int getFontHeight() const override; + void unsetSelectedSpell() override; + void unsetSelectedWeapon() override; - virtual void updateConsoleObjectPtr(const MWWorld::Ptr& currentPtr, const MWWorld::Ptr& newPtr); + void updateConsoleObjectPtr(const MWWorld::Ptr& currentPtr, const MWWorld::Ptr& newPtr) override; - virtual void showCrosshair(bool show); - virtual bool getSubtitlesEnabled(); + void showCrosshair(bool show) override; + bool getSubtitlesEnabled() override; /// Turn visibility of HUD on or off - virtual bool toggleHud(); + bool toggleHud() override; - virtual void disallowMouse(); - virtual void allowMouse(); - virtual void notifyInputActionBound(); + void disallowMouse() override; + void allowMouse() override; + void notifyInputActionBound() override; - virtual void addVisitedLocation(const std::string& name, int x, int y); + void addVisitedLocation(const std::string& name, int x, int y) override; ///Hides dialog and schedules dialog to be deleted. - virtual void removeDialog(Layout* dialog); + void removeDialog(Layout* dialog) override; ///Gracefully attempts to exit the topmost GUI mode - virtual void exitCurrentGuiMode(); + void exitCurrentGuiMode() override; - virtual void messageBox (const std::string& message, enum MWGui::ShowInDialogueMode showInDialogueMode = MWGui::ShowInDialogueMode_IfPossible); - virtual void staticMessageBox(const std::string& message); - virtual void removeStaticMessageBox(); - virtual void interactiveMessageBox (const std::string& message, - const std::vector& buttons = std::vector(), bool block=false); + void messageBox (const std::string& message, enum MWGui::ShowInDialogueMode showInDialogueMode = MWGui::ShowInDialogueMode_IfPossible) override; + void staticMessageBox(const std::string& message) override; + void removeStaticMessageBox() override; + void interactiveMessageBox (const std::string& message, + const std::vector& buttons = std::vector(), bool block=false) override; - virtual int readPressedButton (); ///< returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox) + int readPressedButton () override; ///< returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox) - virtual void update (float duration); + void update (float duration) override; /** * Fetches a GMST string from the store, if there is no setting with the given @@ -279,108 +279,108 @@ namespace MWGui * @param id Identifier for the GMST setting, e.g. "aName" * @param default Default value if the GMST setting cannot be used. */ - virtual std::string getGameSettingString(const std::string &id, const std::string &default_); + std::string getGameSettingString(const std::string &id, const std::string &default_) override; - virtual void processChangedSettings(const Settings::CategorySettingVector& changed); + void processChangedSettings(const Settings::CategorySettingVector& changed) override; - virtual void windowVisibilityChange(bool visible); - virtual void windowResized(int x, int y); - virtual void windowClosed(); - virtual bool isWindowVisible(); + void windowVisibilityChange(bool visible) override; + void windowResized(int x, int y) override; + void windowClosed() override; + bool isWindowVisible() override; - virtual void watchActor(const MWWorld::Ptr& ptr); - virtual MWWorld::Ptr getWatchedActor() const; + void watchActor(const MWWorld::Ptr& ptr) override; + MWWorld::Ptr getWatchedActor() const override; - virtual void executeInConsole (const std::string& path); + void executeInConsole (const std::string& path) override; - virtual void enableRest() { mRestAllowed = true; } - virtual bool getRestEnabled(); + void enableRest() override { mRestAllowed = true; } + bool getRestEnabled() override; - virtual bool getJournalAllowed() { return (mAllowed & GW_Magic) != 0; } + bool getJournalAllowed() override { return (mAllowed & GW_Magic) != 0; } - virtual bool getPlayerSleeping(); - virtual void wakeUpPlayer(); + bool getPlayerSleeping() override; + void wakeUpPlayer() override; - virtual void updatePlayer(); + void updatePlayer() override; - virtual void showSoulgemDialog (MWWorld::Ptr item); + void showSoulgemDialog (MWWorld::Ptr item) override; - virtual void changePointer (const std::string& name); + void changePointer (const std::string& name) override; - virtual void setEnemy (const MWWorld::Ptr& enemy); + void setEnemy (const MWWorld::Ptr& enemy) override; - virtual int getMessagesCount() const; + int getMessagesCount() const override; - virtual const Translation::Storage& getTranslationDataStorage() const; + const Translation::Storage& getTranslationDataStorage() const override; void onSoulgemDialogButtonPressed (int button); - virtual bool getCursorVisible(); + bool getCursorVisible() override; /// Call when mouse cursor or buttons are used. - virtual void setCursorActive(bool active); + void setCursorActive(bool active) override; /// Clear all savegame-specific data - virtual void clear(); + void clear() override; - virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress); - virtual void readRecord (ESM::ESMReader& reader, uint32_t type); - virtual int countSavedGameRecords() const; + void write (ESM::ESMWriter& writer, Loading::Listener& progress) override; + void readRecord (ESM::ESMReader& reader, uint32_t type) override; + int countSavedGameRecords() const override; /// Does the current stack of GUI-windows permit saving? - virtual bool isSavingAllowed() const; + bool isSavingAllowed() const override; /// Send exit command to active Modal window **/ - virtual void exitCurrentModal(); + void exitCurrentModal() override; /// Sets the current Modal /** Used to send exit command to active Modal when Esc is pressed **/ - virtual void addCurrentModal(WindowModal* input); + void addCurrentModal(WindowModal* input) override; /// Removes the top Modal /** Used when one Modal adds another Modal \param input Pointer to the current modal, to ensure proper modal is removed **/ - virtual void removeCurrentModal(WindowModal* input); + void removeCurrentModal(WindowModal* input) override; - virtual void pinWindow (MWGui::GuiWindow window); - virtual void toggleMaximized(Layout *layout); + void pinWindow (MWGui::GuiWindow window) override; + void toggleMaximized(Layout *layout) override; /// Fade the screen in, over \a time seconds - virtual void fadeScreenIn(const float time, bool clearQueue, float delay); + void fadeScreenIn(const float time, bool clearQueue, float delay) override; /// Fade the screen out to black, over \a time seconds - virtual void fadeScreenOut(const float time, bool clearQueue, float delay); + void fadeScreenOut(const float time, bool clearQueue, float delay) override; /// Fade the screen to a specified percentage of black, over \a time seconds - virtual void fadeScreenTo(const int percent, const float time, bool clearQueue, float delay); + void fadeScreenTo(const int percent, const float time, bool clearQueue, float delay) override; /// Darken the screen to a specified percentage - virtual void setBlindness(const int percent); + void setBlindness(const int percent) override; - virtual void activateHitOverlay(bool interrupt); - virtual void setWerewolfOverlay(bool set); + void activateHitOverlay(bool interrupt) override; + void setWerewolfOverlay(bool set) override; - virtual void toggleConsole(); - virtual void toggleDebugWindow(); + void toggleConsole() override; + void toggleDebugWindow() override; /// Cycle to next or previous spell - virtual void cycleSpell(bool next); + void cycleSpell(bool next) override; /// Cycle to next or previous weapon - virtual void cycleWeapon(bool next); + void cycleWeapon(bool next) override; - virtual void playSound(const std::string& soundId, float volume = 1.f, float pitch = 1.f); + void playSound(const std::string& soundId, float volume = 1.f, float pitch = 1.f) override; // In WindowManager for now since there isn't a VFS singleton - virtual std::string correctIconPath(const std::string& path); - virtual std::string correctBookartPath(const std::string& path, int width, int height, bool* exists = nullptr); - virtual std::string correctTexturePath(const std::string& path); - virtual bool textureExists(const std::string& path); + std::string correctIconPath(const std::string& path) override; + std::string correctBookartPath(const std::string& path, int width, int height, bool* exists = nullptr) override; + std::string correctTexturePath(const std::string& path) override; + bool textureExists(const std::string& path) override; - void addCell(MWWorld::CellStore* cell); - void removeCell(MWWorld::CellStore* cell); - void writeFog(MWWorld::CellStore* cell); + void addCell(MWWorld::CellStore* cell) override; + void removeCell(MWWorld::CellStore* cell) override; + void writeFog(MWWorld::CellStore* cell) override; - virtual const MWGui::TextColours& getTextColours(); + const MWGui::TextColours& getTextColours() override; - virtual bool injectKeyPress(MyGUI::KeyCode key, unsigned int text, bool repeat=false); - virtual bool injectKeyRelease(MyGUI::KeyCode key); + bool injectKeyPress(MyGUI::KeyCode key, unsigned int text, bool repeat=false) override; + bool injectKeyRelease(MyGUI::KeyCode key) override; private: unsigned int mOldUpdateMask; unsigned int mOldCullMask; @@ -458,7 +458,7 @@ namespace MWGui int mPlayerBounty; - void setCursorVisible(bool visible); + void setCursorVisible(bool visible) override; MyGUI::Gui *mGui; // Gui diff --git a/apps/openmw/mwinput/bindingsmanager.cpp b/apps/openmw/mwinput/bindingsmanager.cpp index 9d77ec99cf..18fac6ae29 100644 --- a/apps/openmw/mwinput/bindingsmanager.cpp +++ b/apps/openmw/mwinput/bindingsmanager.cpp @@ -62,14 +62,14 @@ namespace MWInput virtual ~BindingsListener() = default; - virtual void channelChanged(ICS::Channel* channel, float currentValue, float previousValue) + void channelChanged(ICS::Channel* channel, float currentValue, float previousValue) override { int action = channel->getNumber(); mBindingsManager->actionValueChanged(action, currentValue, previousValue); } - virtual void keyBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control - , SDL_Scancode key, ICS::Control::ControlChangingDirection direction) + void keyBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control + , SDL_Scancode key, ICS::Control::ControlChangingDirection direction) override { //Disallow binding escape key if (key==SDL_SCANCODE_ESCAPE) @@ -99,15 +99,15 @@ namespace MWInput MWBase::Environment::get().getWindowManager()->notifyInputActionBound(); } - virtual void mouseAxisBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control - , ICS::InputControlSystem::NamedAxis axis, ICS::Control::ControlChangingDirection direction) + void mouseAxisBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control + , ICS::InputControlSystem::NamedAxis axis, ICS::Control::ControlChangingDirection direction) override { // we don't want mouse movement bindings return; } - virtual void mouseButtonBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control - , unsigned int button, ICS::Control::ControlChangingDirection direction) + void mouseButtonBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control + , unsigned int button, ICS::Control::ControlChangingDirection direction) override { if (!mDetectingKeyboard) return; @@ -117,8 +117,8 @@ namespace MWInput MWBase::Environment::get().getWindowManager()->notifyInputActionBound(); } - virtual void mouseWheelBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control - , ICS::InputControlSystem::MouseWheelClick click, ICS::Control::ControlChangingDirection direction) + void mouseWheelBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control + , ICS::InputControlSystem::MouseWheelClick click, ICS::Control::ControlChangingDirection direction) override { if (!mDetectingKeyboard) return; @@ -128,8 +128,8 @@ namespace MWInput MWBase::Environment::get().getWindowManager()->notifyInputActionBound(); } - virtual void joystickAxisBindingDetected(ICS::InputControlSystem* ICS, int deviceID, ICS::Control* control - , int axis, ICS::Control::ControlChangingDirection direction) + void joystickAxisBindingDetected(ICS::InputControlSystem* ICS, int deviceID, ICS::Control* control + , int axis, ICS::Control::ControlChangingDirection direction) override { //only allow binding to the trigers if (axis != SDL_CONTROLLER_AXIS_TRIGGERLEFT && axis != SDL_CONTROLLER_AXIS_TRIGGERRIGHT) @@ -144,8 +144,8 @@ namespace MWInput MWBase::Environment::get().getWindowManager()->notifyInputActionBound(); } - virtual void joystickButtonBindingDetected(ICS::InputControlSystem* ICS, int deviceID, ICS::Control* control - , unsigned int button, ICS::Control::ControlChangingDirection direction) + void joystickButtonBindingDetected(ICS::InputControlSystem* ICS, int deviceID, ICS::Control* control + , unsigned int button, ICS::Control::ControlChangingDirection direction) override { if (mDetectingKeyboard) return; diff --git a/apps/openmw/mwinput/controllermanager.hpp b/apps/openmw/mwinput/controllermanager.hpp index 3c1a2ee6e8..871f11102e 100644 --- a/apps/openmw/mwinput/controllermanager.hpp +++ b/apps/openmw/mwinput/controllermanager.hpp @@ -25,11 +25,11 @@ namespace MWInput bool update(float dt); - virtual void buttonPressed(int deviceID, const SDL_ControllerButtonEvent &arg); - virtual void buttonReleased(int deviceID, const SDL_ControllerButtonEvent &arg); - virtual void axisMoved(int deviceID, const SDL_ControllerAxisEvent &arg); - virtual void controllerAdded(int deviceID, const SDL_ControllerDeviceEvent &arg); - virtual void controllerRemoved(const SDL_ControllerDeviceEvent &arg); + void buttonPressed(int deviceID, const SDL_ControllerButtonEvent &arg) override; + void buttonReleased(int deviceID, const SDL_ControllerButtonEvent &arg) override; + void axisMoved(int deviceID, const SDL_ControllerAxisEvent &arg) override; + void controllerAdded(int deviceID, const SDL_ControllerDeviceEvent &arg) override; + void controllerRemoved(const SDL_ControllerDeviceEvent &arg) override; void processChangedSettings(const Settings::CategorySettingVector& changed); diff --git a/apps/openmw/mwinput/inputmanagerimp.hpp b/apps/openmw/mwinput/inputmanagerimp.hpp index debbf27e0d..f930836d1c 100644 --- a/apps/openmw/mwinput/inputmanagerimp.hpp +++ b/apps/openmw/mwinput/inputmanagerimp.hpp @@ -58,43 +58,43 @@ namespace MWInput virtual ~InputManager(); /// Clear all savegame-specific data - virtual void clear(); + void clear() override; - virtual void update(float dt, bool disableControls=false, bool disableEvents=false); + void update(float dt, bool disableControls=false, bool disableEvents=false) override; - virtual void changeInputMode(bool guiMode); + void changeInputMode(bool guiMode) override; - virtual void processChangedSettings(const Settings::CategorySettingVector& changed); + void processChangedSettings(const Settings::CategorySettingVector& changed) override; - virtual void setDragDrop(bool dragDrop); - virtual void setGamepadGuiCursorEnabled(bool enabled); - virtual void setAttemptJump(bool jumping); + void setDragDrop(bool dragDrop) override; + void setGamepadGuiCursorEnabled(bool enabled) override; + void setAttemptJump(bool jumping) override; - virtual void toggleControlSwitch (const std::string& sw, bool value); - virtual bool getControlSwitch (const std::string& sw); + void toggleControlSwitch (const std::string& sw, bool value) override; + bool getControlSwitch (const std::string& sw) override; - virtual std::string getActionDescription (int action); - virtual std::string getActionKeyBindingName (int action); - virtual std::string getActionControllerBindingName (int action); - virtual int getNumActions() { return A_Last; } - virtual std::vector getActionKeySorting(); - virtual std::vector getActionControllerSorting(); - virtual void enableDetectingBindingMode (int action, bool keyboard); - virtual void resetToDefaultKeyBindings(); - virtual void resetToDefaultControllerBindings(); + std::string getActionDescription (int action) override; + std::string getActionKeyBindingName (int action) override; + std::string getActionControllerBindingName (int action) override; + int getNumActions() override { return A_Last; } + std::vector getActionKeySorting() override; + std::vector getActionControllerSorting() override; + void enableDetectingBindingMode (int action, bool keyboard) override; + void resetToDefaultKeyBindings() override; + void resetToDefaultControllerBindings() override; - virtual void setJoystickLastUsed(bool enabled); - virtual bool joystickLastUsed(); + void setJoystickLastUsed(bool enabled) override; + bool joystickLastUsed() override; - virtual int countSavedGameRecords() const; - virtual void write(ESM::ESMWriter& writer, Loading::Listener& progress); - virtual void readRecord(ESM::ESMReader& reader, uint32_t type); + int countSavedGameRecords() const override; + void write(ESM::ESMWriter& writer, Loading::Listener& progress) override; + void readRecord(ESM::ESMReader& reader, uint32_t type) override; - virtual void resetIdleTime(); + void resetIdleTime() override; - virtual void executeAction(int action); + void executeAction(int action) override; - virtual bool controlsDisabled() { return mControlsDisabled; } + bool controlsDisabled() override { return mControlsDisabled; } private: void convertMousePosForMyGUI(int& x, int& y); diff --git a/apps/openmw/mwinput/keyboardmanager.hpp b/apps/openmw/mwinput/keyboardmanager.hpp index b7027220f2..f97f6b9e60 100644 --- a/apps/openmw/mwinput/keyboardmanager.hpp +++ b/apps/openmw/mwinput/keyboardmanager.hpp @@ -15,9 +15,9 @@ namespace MWInput virtual ~KeyboardManager() = default; - virtual void textInput(const SDL_TextInputEvent &arg); - virtual void keyPressed(const SDL_KeyboardEvent &arg); - virtual void keyReleased(const SDL_KeyboardEvent &arg); + void textInput(const SDL_TextInputEvent &arg) override; + void keyPressed(const SDL_KeyboardEvent &arg) override; + void keyReleased(const SDL_KeyboardEvent &arg) override; private: BindingsManager* mBindingsManager; diff --git a/apps/openmw/mwinput/mousemanager.hpp b/apps/openmw/mwinput/mousemanager.hpp index f3d16cd809..3bf692bcf8 100644 --- a/apps/openmw/mwinput/mousemanager.hpp +++ b/apps/openmw/mwinput/mousemanager.hpp @@ -23,10 +23,10 @@ namespace MWInput void updateCursorMode(); void update(float dt); - virtual void mouseMoved(const SDLUtil::MouseMotionEvent &arg); - virtual void mousePressed(const SDL_MouseButtonEvent &arg, Uint8 id); - virtual void mouseReleased(const SDL_MouseButtonEvent &arg, Uint8 id); - virtual void mouseWheelMoved(const SDL_MouseWheelEvent &arg); + void mouseMoved(const SDLUtil::MouseMotionEvent &arg) override; + void mousePressed(const SDL_MouseButtonEvent &arg, Uint8 id) override; + void mouseReleased(const SDL_MouseButtonEvent &arg, Uint8 id) override; + void mouseWheelMoved(const SDL_MouseWheelEvent &arg) override; void processChangedSettings(const Settings::CategorySettingVector& changed); diff --git a/apps/openmw/mwinput/sensormanager.hpp b/apps/openmw/mwinput/sensormanager.hpp index 8f333ad314..75472d43b4 100644 --- a/apps/openmw/mwinput/sensormanager.hpp +++ b/apps/openmw/mwinput/sensormanager.hpp @@ -29,8 +29,8 @@ namespace MWInput void update(float dt); - virtual void sensorUpdated(const SDL_SensorEvent &arg); - virtual void displayOrientationChanged(); + void sensorUpdated(const SDL_SensorEvent &arg) override; + void displayOrientationChanged() override; void processChangedSettings(const Settings::CategorySettingVector& changed); void setGuiCursorEnabled(bool enabled) { mGuiCursorEnabled = enabled; } diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index ec65990936..d936a0b00d 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -95,9 +95,9 @@ public: : mActor(actor) , mCommanded(false){} - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1) + float magnitude, float remainingTime = -1, float totalTime = -1) override { if (((key.mId == ESM::MagicEffect::CommandHumanoid && mActor.getClass().isNpc()) || (key.mId == ESM::MagicEffect::CommandCreature && mActor.getTypeName() == typeid(ESM::Creature).name())) @@ -159,9 +159,9 @@ namespace MWMechanics GetStuntedMagickaDuration(const MWWorld::Ptr& actor) : mRemainingTime(0.f){} - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1) + float magnitude, float remainingTime = -1, float totalTime = -1) override { if (mRemainingTime == -1) return; @@ -189,9 +189,9 @@ namespace MWMechanics { } - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1) + float magnitude, float remainingTime = -1, float totalTime = -1) override { if (magnitude <= 0) return; @@ -209,9 +209,9 @@ namespace MWMechanics { public: - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1) + float magnitude, float remainingTime = -1, float totalTime = -1) override { if (key.mId != ESM::MagicEffect::Corprus) return; @@ -234,9 +234,9 @@ namespace MWMechanics { } - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1) + float magnitude, float remainingTime = -1, float totalTime = -1) override { if (mTrapped) return; @@ -901,9 +901,9 @@ namespace MWMechanics { } - virtual void visit (MWMechanics::EffectKey key, int /*effectIndex*/, + void visit (MWMechanics::EffectKey key, int /*effectIndex*/, const std::string& /*sourceName*/, const std::string& /*sourceId*/, int /*casterActorId*/, - float magnitude, float remainingTime = -1, float /*totalTime*/ = -1) + float magnitude, float remainingTime = -1, float /*totalTime*/ = -1) override { if (magnitude > 0 && remainingTime > 0 && remainingTime < mDuration) { diff --git a/apps/openmw/mwmechanics/aicombataction.hpp b/apps/openmw/mwmechanics/aicombataction.hpp index cf7dc78fd9..77a19f8044 100644 --- a/apps/openmw/mwmechanics/aicombataction.hpp +++ b/apps/openmw/mwmechanics/aicombataction.hpp @@ -17,7 +17,7 @@ namespace MWMechanics virtual void prepare(const MWWorld::Ptr& actor) = 0; virtual float getCombatRange (bool& isRanged) const = 0; virtual float getActionCooldown() { return 0.f; } - virtual const ESM::Weapon* getWeapon() const { return nullptr; }; + virtual const ESM::Weapon* getWeapon() const { return nullptr; } virtual bool isAttackingOrSpell() const { return true; } virtual bool isFleeing() const { return false; } }; @@ -26,11 +26,11 @@ namespace MWMechanics { public: ActionFlee() {} - virtual void prepare(const MWWorld::Ptr& actor) {} - virtual float getCombatRange (bool& isRanged) const { return 0.0f; } - virtual float getActionCooldown() { return 3.0f; } - virtual bool isAttackingOrSpell() const { return false; } - virtual bool isFleeing() const { return true; } + void prepare(const MWWorld::Ptr& actor) override {} + float getCombatRange (bool& isRanged) const override { return 0.0f; } + float getActionCooldown() override { return 3.0f; } + bool isAttackingOrSpell() const override { return false; } + bool isFleeing() const override { return true; } }; class ActionSpell : public Action @@ -39,9 +39,9 @@ namespace MWMechanics ActionSpell(const std::string& spellId) : mSpellId(spellId) {} std::string mSpellId; /// Sets the given spell as selected on the actor's spell list. - virtual void prepare(const MWWorld::Ptr& actor); + void prepare(const MWWorld::Ptr& actor) override; - virtual float getCombatRange (bool& isRanged) const; + float getCombatRange (bool& isRanged) const override; }; class ActionEnchantedItem : public Action @@ -50,11 +50,11 @@ namespace MWMechanics ActionEnchantedItem(const MWWorld::ContainerStoreIterator& item) : mItem(item) {} MWWorld::ContainerStoreIterator mItem; /// Sets the given item as selected enchanted item in the actor's InventoryStore. - virtual void prepare(const MWWorld::Ptr& actor); - virtual float getCombatRange (bool& isRanged) const; + void prepare(const MWWorld::Ptr& actor) override; + float getCombatRange (bool& isRanged) const override; /// Since this action has no animation, apply a small cool down for using it - virtual float getActionCooldown() { return 0.75f; } + float getActionCooldown() override { return 0.75f; } }; class ActionPotion : public Action @@ -63,12 +63,12 @@ namespace MWMechanics ActionPotion(const MWWorld::Ptr& potion) : mPotion(potion) {} MWWorld::Ptr mPotion; /// Drinks the given potion. - virtual void prepare(const MWWorld::Ptr& actor); - virtual float getCombatRange (bool& isRanged) const; - virtual bool isAttackingOrSpell() const { return false; } + void prepare(const MWWorld::Ptr& actor) override; + float getCombatRange (bool& isRanged) const override; + bool isAttackingOrSpell() const override { return false; } /// Since this action has no animation, apply a small cool down for using it - virtual float getActionCooldown() { return 0.75f; } + float getActionCooldown() override { return 0.75f; } }; class ActionWeapon : public Action @@ -82,9 +82,9 @@ namespace MWMechanics ActionWeapon(const MWWorld::Ptr& weapon, const MWWorld::Ptr& ammo = MWWorld::Ptr()) : mAmmunition(ammo), mWeapon(weapon) {} /// Equips the given weapon. - virtual void prepare(const MWWorld::Ptr& actor); - virtual float getCombatRange (bool& isRanged) const; - virtual const ESM::Weapon* getWeapon() const; + void prepare(const MWWorld::Ptr& actor) override; + float getCombatRange (bool& isRanged) const override; + const ESM::Weapon* getWeapon() const override; }; std::shared_ptr prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& enemy); diff --git a/apps/openmw/mwmechanics/character.hpp b/apps/openmw/mwmechanics/character.hpp index 0336c4e69e..949affcfde 100644 --- a/apps/openmw/mwmechanics/character.hpp +++ b/apps/openmw/mwmechanics/character.hpp @@ -241,7 +241,7 @@ public: CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim); virtual ~CharacterController(); - virtual void handleTextKey(const std::string &groupname, NifOsg::TextKeyMap::ConstIterator key, const NifOsg::TextKeyMap& map); + void handleTextKey(const std::string &groupname, NifOsg::TextKeyMap::ConstIterator key, const NifOsg::TextKeyMap& map) override; // Be careful when to call this, see comment in Actors void updateContinuousVfx(); diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.hpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.hpp index c546497bb8..28f62b7774 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.hpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.hpp @@ -42,65 +42,65 @@ namespace MWMechanics MechanicsManager(); - virtual void add (const MWWorld::Ptr& ptr) override; + void add (const MWWorld::Ptr& ptr) override; ///< Register an object for management - virtual void remove (const MWWorld::Ptr& ptr) override; + void remove (const MWWorld::Ptr& ptr) override; ///< Deregister an object for management - virtual void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) override; + void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) override; ///< Moves an object to a new cell - virtual void drop(const MWWorld::CellStore *cellStore) override; + void drop(const MWWorld::CellStore *cellStore) override; ///< Deregister all objects in the given cell. - virtual void update (float duration, bool paused) override; + void update (float duration, bool paused) override; ///< Update objects /// /// \param paused In game type does not currently advance (this usually means some GUI /// component is up). - virtual void setPlayerName (const std::string& name) override; + void setPlayerName (const std::string& name) override; ///< Set player name. - virtual void setPlayerRace (const std::string& id, bool male, const std::string &head, const std::string &hair) override; + void setPlayerRace (const std::string& id, bool male, const std::string &head, const std::string &hair) override; ///< Set player race. - virtual void setPlayerBirthsign (const std::string& id) override; + void setPlayerBirthsign (const std::string& id) override; ///< Set player birthsign. - virtual void setPlayerClass (const std::string& id) override; + void setPlayerClass (const std::string& id) override; ///< Set player class to stock class. - virtual void setPlayerClass (const ESM::Class& class_) override; + void setPlayerClass (const ESM::Class& class_) override; ///< Set player class to custom class. - virtual void restoreDynamicStats(MWWorld::Ptr actor, double hours, bool sleep) override; + void restoreDynamicStats(MWWorld::Ptr actor, double hours, bool sleep) override; - virtual void rest(double hours, bool sleep) override; + void rest(double hours, bool sleep) override; ///< If the player is sleeping or waiting, this should be called every hour. /// @param sleep is the player sleeping or waiting? - virtual int getHoursToRest() const override; + int getHoursToRest() const override; ///< Calculate how many hours the player needs to rest in order to be fully healed - virtual int getBarterOffer(const MWWorld::Ptr& ptr,int basePrice, bool buying) override; + int getBarterOffer(const MWWorld::Ptr& ptr,int basePrice, bool buying) override; ///< This is used by every service to determine the price of objects given the trading skills of the player and NPC. - virtual int getDerivedDisposition(const MWWorld::Ptr& ptr, bool addTemporaryDispositionChange = true) override; + int getDerivedDisposition(const MWWorld::Ptr& ptr, bool addTemporaryDispositionChange = true) override; ///< Calculate the diposition of an NPC toward the player. - virtual int countDeaths (const std::string& id) const override; + int countDeaths (const std::string& id) const override; ///< Return the number of deaths for actors with the given ID. - virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange) override; + void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange) override; ///< Perform a persuasion action on NPC /// Check if \a observer is potentially aware of \a ptr. Does not do a line of sight check! - virtual bool awarenessCheck (const MWWorld::Ptr& ptr, const MWWorld::Ptr& observer) override; + bool awarenessCheck (const MWWorld::Ptr& ptr, const MWWorld::Ptr& observer) override; /// Makes \a ptr fight \a target. Also shouts a combat taunt. - virtual void startCombat (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target) override; + void startCombat (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target) override; /** * @note victim may be empty @@ -109,127 +109,127 @@ namespace MWMechanics * If this parameter is false, it will be determined by a line-of-sight and awareness check. * @return was the crime seen? */ - virtual bool commitCrime (const MWWorld::Ptr& ptr, const MWWorld::Ptr& victim, + bool commitCrime (const MWWorld::Ptr& ptr, const MWWorld::Ptr& victim, OffenseType type, const std::string& factionId="", int arg=0, bool victimAware=false) override; /// @return false if the attack was considered a "friendly hit" and forgiven - virtual bool actorAttacked (const MWWorld::Ptr& victim, const MWWorld::Ptr& attacker) override; + bool actorAttacked (const MWWorld::Ptr& victim, const MWWorld::Ptr& attacker) override; /// Notify that actor was killed, add a murder bounty if applicable /// @note No-op for non-player attackers - virtual void actorKilled (const MWWorld::Ptr& victim, const MWWorld::Ptr& attacker) override; + void actorKilled (const MWWorld::Ptr& victim, const MWWorld::Ptr& attacker) override; /// Utility to check if taking this item is illegal and calling commitCrime if so /// @param container The container the item is in; may be empty for an item in the world - virtual void itemTaken (const MWWorld::Ptr& ptr, const MWWorld::Ptr& item, const MWWorld::Ptr& container, + void itemTaken (const MWWorld::Ptr& ptr, const MWWorld::Ptr& item, const MWWorld::Ptr& container, int count, bool alarm = true) override; /// Utility to check if unlocking this object is illegal and calling commitCrime if so - virtual void unlockAttempted (const MWWorld::Ptr& ptr, const MWWorld::Ptr& item) override; + void unlockAttempted (const MWWorld::Ptr& ptr, const MWWorld::Ptr& item) override; /// Attempt sleeping in a bed. If this is illegal, call commitCrime. /// @return was it illegal, and someone saw you doing it? Also returns fail when enemies are nearby - virtual bool sleepInBed (const MWWorld::Ptr& ptr, const MWWorld::Ptr& bed) override; + bool sleepInBed (const MWWorld::Ptr& ptr, const MWWorld::Ptr& bed) override; - virtual void forceStateUpdate(const MWWorld::Ptr &ptr) override; + void forceStateUpdate(const MWWorld::Ptr &ptr) override; /// Attempt to play an animation group /// @return Success or error - virtual bool playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number, bool persist=false) override; - virtual void skipAnimation(const MWWorld::Ptr& ptr) override; - virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName) override; - virtual void persistAnimationStates() override; + bool playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number, bool persist=false) override; + void skipAnimation(const MWWorld::Ptr& ptr) override; + bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName) override; + void persistAnimationStates() override; /// Update magic effects for an actor. Usually done automatically once per frame, but if we're currently /// paused we may want to do it manually (after equipping permanent enchantment) - virtual void updateMagicEffects (const MWWorld::Ptr& ptr) override; + void updateMagicEffects (const MWWorld::Ptr& ptr) override; - virtual void getObjectsInRange (const osg::Vec3f& position, float radius, std::vector& objects) override; - virtual void getActorsInRange(const osg::Vec3f &position, float radius, std::vector &objects) override; + void getObjectsInRange (const osg::Vec3f& position, float radius, std::vector& objects) override; + void getActorsInRange(const osg::Vec3f &position, float radius, std::vector &objects) override; /// Check if there are actors in selected range - virtual bool isAnyActorInRange(const osg::Vec3f &position, float radius) override; + bool isAnyActorInRange(const osg::Vec3f &position, float radius) override; - virtual std::list getActorsSidingWith(const MWWorld::Ptr& actor) override; - virtual std::list getActorsFollowing(const MWWorld::Ptr& actor) override; - virtual std::list getActorsFollowingIndices(const MWWorld::Ptr& actor) override; + std::list getActorsSidingWith(const MWWorld::Ptr& actor) override; + std::list getActorsFollowing(const MWWorld::Ptr& actor) override; + std::list getActorsFollowingIndices(const MWWorld::Ptr& actor) override; - virtual std::list getActorsFighting(const MWWorld::Ptr& actor) override; - virtual std::list getEnemiesNearby(const MWWorld::Ptr& actor) override; + std::list getActorsFighting(const MWWorld::Ptr& actor) override; + std::list getEnemiesNearby(const MWWorld::Ptr& actor) override; /// Recursive version of getActorsFollowing - virtual void getActorsFollowing(const MWWorld::Ptr& actor, std::set& out) override; + void getActorsFollowing(const MWWorld::Ptr& actor, std::set& out) override; /// Recursive version of getActorsSidingWith - virtual void getActorsSidingWith(const MWWorld::Ptr& actor, std::set& out) override; + void getActorsSidingWith(const MWWorld::Ptr& actor, std::set& out) override; - virtual bool toggleAI() override; - virtual bool isAIActive() override; + bool toggleAI() override; + bool isAIActive() override; - virtual void playerLoaded() override; + void playerLoaded() override; - virtual bool onOpen(const MWWorld::Ptr& ptr) override; - virtual void onClose(const MWWorld::Ptr& ptr) override; + bool onOpen(const MWWorld::Ptr& ptr) override; + void onClose(const MWWorld::Ptr& ptr) override; - virtual int countSavedGameRecords() const override; + int countSavedGameRecords() const override; - virtual void write (ESM::ESMWriter& writer, Loading::Listener& listener) const override; + void write (ESM::ESMWriter& writer, Loading::Listener& listener) const override; - virtual void readRecord (ESM::ESMReader& reader, uint32_t type) override; + void readRecord (ESM::ESMReader& reader, uint32_t type) override; - virtual void clear() override; + void clear() override; - virtual bool isAggressive (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target) override; + bool isAggressive (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target) override; - virtual void resurrect(const MWWorld::Ptr& ptr) override; + void resurrect(const MWWorld::Ptr& ptr) override; - virtual bool isCastingSpell (const MWWorld::Ptr& ptr) const override; + bool isCastingSpell (const MWWorld::Ptr& ptr) const override; - virtual bool isReadyToBlock (const MWWorld::Ptr& ptr) const override; + bool isReadyToBlock (const MWWorld::Ptr& ptr) const override; /// Is \a ptr casting spell or using weapon now? - virtual bool isAttackingOrSpell(const MWWorld::Ptr &ptr) const override; + bool isAttackingOrSpell(const MWWorld::Ptr &ptr) const override; - virtual void castSpell(const MWWorld::Ptr& ptr, const std::string spellId, bool manualSpell=false) override; + void castSpell(const MWWorld::Ptr& ptr, const std::string spellId, bool manualSpell=false) override; void processChangedSettings(const Settings::CategorySettingVector& settings) override; - virtual float getActorsProcessingRange() const override; + float getActorsProcessingRange() const override; - virtual void notifyDied(const MWWorld::Ptr& actor) override; + void notifyDied(const MWWorld::Ptr& actor) override; /// Check if the target actor was detected by an observer /// If the observer is a non-NPC, check all actors in AI processing distance as observers - virtual bool isActorDetected(const MWWorld::Ptr& actor, const MWWorld::Ptr& observer) override; + bool isActorDetected(const MWWorld::Ptr& actor, const MWWorld::Ptr& observer) override; - virtual void confiscateStolenItems (const MWWorld::Ptr& player, const MWWorld::Ptr& targetContainer) override; + void confiscateStolenItems (const MWWorld::Ptr& player, const MWWorld::Ptr& targetContainer) override; /// List the owners that the player has stolen this item from (the owner can be an NPC or a faction). /// - virtual std::vector > getStolenItemOwners(const std::string& itemid) override; + std::vector > getStolenItemOwners(const std::string& itemid) override; /// Has the player stolen this item from the given owner? - virtual bool isItemStolenFrom(const std::string& itemid, const MWWorld::Ptr& ptr) override; + bool isItemStolenFrom(const std::string& itemid, const MWWorld::Ptr& ptr) override; - virtual bool isBoundItem(const MWWorld::Ptr& item) override; + bool isBoundItem(const MWWorld::Ptr& item) override; /// @return is \a ptr allowed to take/use \a target or is it a crime? - virtual bool isAllowedToUse (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target, MWWorld::Ptr& victim) override; + bool isAllowedToUse (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target, MWWorld::Ptr& victim) override; - virtual void setWerewolf(const MWWorld::Ptr& actor, bool werewolf) override; - virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor) override; + void setWerewolf(const MWWorld::Ptr& actor, bool werewolf) override; + void applyWerewolfAcrobatics(const MWWorld::Ptr& actor) override; - virtual void cleanupSummonedCreature(const MWWorld::Ptr& caster, int creatureActorId) override; + void cleanupSummonedCreature(const MWWorld::Ptr& caster, int creatureActorId) override; - virtual void confiscateStolenItemToOwner(const MWWorld::Ptr &player, const MWWorld::Ptr &item, const MWWorld::Ptr& victim, int count) override; + void confiscateStolenItemToOwner(const MWWorld::Ptr &player, const MWWorld::Ptr &item, const MWWorld::Ptr& victim, int count) override; - virtual bool isAttackPreparing(const MWWorld::Ptr& ptr) override; - virtual bool isRunning(const MWWorld::Ptr& ptr) override; - virtual bool isSneaking(const MWWorld::Ptr& ptr) override; + bool isAttackPreparing(const MWWorld::Ptr& ptr) override; + bool isRunning(const MWWorld::Ptr& ptr) override; + bool isSneaking(const MWWorld::Ptr& ptr) override; - virtual void reportStats(unsigned int frameNumber, osg::Stats& stats) const override; + void reportStats(unsigned int frameNumber, osg::Stats& stats) const override; - virtual int getGreetingTimer(const MWWorld::Ptr& ptr) const override; - virtual float getAngleToPlayer(const MWWorld::Ptr& ptr) const override; - virtual GreetingState getGreetingState(const MWWorld::Ptr& ptr) const override; - virtual bool isTurningToPlayer(const MWWorld::Ptr& ptr) const override; + int getGreetingTimer(const MWWorld::Ptr& ptr) const override; + float getAngleToPlayer(const MWWorld::Ptr& ptr) const override; + GreetingState getGreetingState(const MWWorld::Ptr& ptr) const override; + bool isTurningToPlayer(const MWWorld::Ptr& ptr) const override; - virtual void restoreStatsAfterCorprus(const MWWorld::Ptr& actor, const std::string& sourceId) override; + void restoreStatsAfterCorprus(const MWWorld::Ptr& actor, const std::string& sourceId) override; private: bool canCommitCrimeAgainst(const MWWorld::Ptr& victim, const MWWorld::Ptr& attacker); diff --git a/apps/openmw/mwmechanics/spellabsorption.cpp b/apps/openmw/mwmechanics/spellabsorption.cpp index 74df667803..bab290fdab 100644 --- a/apps/openmw/mwmechanics/spellabsorption.cpp +++ b/apps/openmw/mwmechanics/spellabsorption.cpp @@ -24,9 +24,9 @@ namespace MWMechanics GetAbsorptionProbability() = default; - virtual void visit (MWMechanics::EffectKey key, int /*effectIndex*/, + void visit (MWMechanics::EffectKey key, int /*effectIndex*/, const std::string& /*sourceName*/, const std::string& /*sourceId*/, int /*casterActorId*/, - float magnitude, float /*remainingTime*/, float /*totalTime*/) + float magnitude, float /*remainingTime*/, float /*totalTime*/) override { if (key.mId == ESM::MagicEffect::SpellAbsorption) { diff --git a/apps/openmw/mwmechanics/summoning.hpp b/apps/openmw/mwmechanics/summoning.hpp index ac820e32f0..7e787499e4 100644 --- a/apps/openmw/mwmechanics/summoning.hpp +++ b/apps/openmw/mwmechanics/summoning.hpp @@ -22,9 +22,9 @@ namespace MWMechanics UpdateSummonedCreatures(const MWWorld::Ptr& actor); virtual ~UpdateSummonedCreatures() = default; - virtual void visit (MWMechanics::EffectKey key, int effectIndex, + void visit (MWMechanics::EffectKey key, int effectIndex, const std::string& sourceName, const std::string& sourceId, int casterActorId, - float magnitude, float remainingTime = -1, float totalTime = -1); + float magnitude, float remainingTime = -1, float totalTime = -1) override; /// To call after all effect sources have been visited void process(bool cleanup); diff --git a/apps/openmw/mwmechanics/typedaipackage.hpp b/apps/openmw/mwmechanics/typedaipackage.hpp index c959f4d680..d2d424326c 100644 --- a/apps/openmw/mwmechanics/typedaipackage.hpp +++ b/apps/openmw/mwmechanics/typedaipackage.hpp @@ -18,7 +18,7 @@ namespace MWMechanics TypedAiPackage(Derived*) : AiPackage(Derived::getTypeId(), Derived::makeDefaultOptions()) {} - virtual std::unique_ptr clone() const override + std::unique_ptr clone() const override { return std::make_unique(*static_cast(this)); } diff --git a/apps/openmw/mwphysics/closestnotmeconvexresultcallback.hpp b/apps/openmw/mwphysics/closestnotmeconvexresultcallback.hpp index e4e960ab81..97aaa64a1c 100644 --- a/apps/openmw/mwphysics/closestnotmeconvexresultcallback.hpp +++ b/apps/openmw/mwphysics/closestnotmeconvexresultcallback.hpp @@ -12,7 +12,7 @@ namespace MWPhysics public: ClosestNotMeConvexResultCallback(const btCollisionObject *me, const btVector3 &motion, btScalar minCollisionDot); - virtual btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult,bool normalInWorldSpace); + btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult,bool normalInWorldSpace) override; protected: const btCollisionObject *mMe; diff --git a/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp b/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp index 3d2c5704b2..23d52998ca 100644 --- a/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp +++ b/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp @@ -14,7 +14,7 @@ namespace MWPhysics public: ClosestNotMeRayResultCallback(const btCollisionObject* me, const std::vector& targets, const btVector3& from, const btVector3& to); - virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace); + btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) override; private: const btCollisionObject* mMe; const std::vector mTargets; diff --git a/apps/openmw/mwphysics/contacttestresultcallback.hpp b/apps/openmw/mwphysics/contacttestresultcallback.hpp index 0f469127db..03fc362992 100644 --- a/apps/openmw/mwphysics/contacttestresultcallback.hpp +++ b/apps/openmw/mwphysics/contacttestresultcallback.hpp @@ -19,9 +19,9 @@ namespace MWPhysics public: ContactTestResultCallback(const btCollisionObject* testedAgainst); - virtual btScalar addSingleResult(btManifoldPoint& cp, + btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* col0Wrap,int partId0,int index0, - const btCollisionObjectWrapper* col1Wrap,int partId1,int index1); + const btCollisionObjectWrapper* col1Wrap,int partId1,int index1) override; std::vector mResult; }; diff --git a/apps/openmw/mwphysics/deepestnotmecontacttestresultcallback.hpp b/apps/openmw/mwphysics/deepestnotmecontacttestresultcallback.hpp index f1107046b1..9b2e97e657 100644 --- a/apps/openmw/mwphysics/deepestnotmecontacttestresultcallback.hpp +++ b/apps/openmw/mwphysics/deepestnotmecontacttestresultcallback.hpp @@ -24,9 +24,9 @@ namespace MWPhysics DeepestNotMeContactTestResultCallback(const btCollisionObject* me, const std::vector& targets, const btVector3 &origin); - virtual btScalar addSingleResult(btManifoldPoint& cp, + btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* col0Wrap,int partId0,int index0, - const btCollisionObjectWrapper* col1Wrap,int partId1,int index1); + const btCollisionObjectWrapper* col1Wrap,int partId1,int index1) override; }; } diff --git a/apps/openmw/mwphysics/physicssystem.hpp b/apps/openmw/mwphysics/physicssystem.hpp index e5ee925c4c..f89a29cae1 100644 --- a/apps/openmw/mwphysics/physicssystem.hpp +++ b/apps/openmw/mwphysics/physicssystem.hpp @@ -156,17 +156,17 @@ namespace MWPhysics /// target vector hits the collision shape and then calculates distance from the intersection point. /// This can be used to find out how much nearer we need to move to the target for a "getHitContact" to be successful. /// \note Only Actor targets are supported at the moment. - float getHitDistance(const osg::Vec3f& point, const MWWorld::ConstPtr& target) const override final; + float getHitDistance(const osg::Vec3f& point, const MWWorld::ConstPtr& target) const final; /// @param me Optional, a Ptr to ignore in the list of results. targets are actors to filter for, ignoring all other actors. RayCastingResult castRay(const osg::Vec3f &from, const osg::Vec3f &to, const MWWorld::ConstPtr& ignore = MWWorld::ConstPtr(), std::vector targets = std::vector(), - int mask = CollisionType_World|CollisionType_HeightMap|CollisionType_Actor|CollisionType_Door, int group=0xff) const override final; + int mask = CollisionType_World|CollisionType_HeightMap|CollisionType_Actor|CollisionType_Door, int group=0xff) const final; - RayCastingResult castSphere(const osg::Vec3f& from, const osg::Vec3f& to, float radius) const override final; + RayCastingResult castSphere(const osg::Vec3f& from, const osg::Vec3f& to, float radius) const final; /// Return true if actor1 can see actor2. - bool getLineOfSight(const MWWorld::ConstPtr& actor1, const MWWorld::ConstPtr& actor2) const override final; + bool getLineOfSight(const MWWorld::ConstPtr& actor1, const MWWorld::ConstPtr& actor2) const final; bool isOnGround (const MWWorld::Ptr& actor); diff --git a/apps/openmw/mwrender/actoranimation.hpp b/apps/openmw/mwrender/actoranimation.hpp index 14c687a5d8..86929a18a7 100644 --- a/apps/openmw/mwrender/actoranimation.hpp +++ b/apps/openmw/mwrender/actoranimation.hpp @@ -35,11 +35,11 @@ class ActorAnimation : public Animation, public MWWorld::ContainerStoreListener ActorAnimation(const MWWorld::Ptr &ptr, osg::ref_ptr parentNode, Resource::ResourceSystem* resourceSystem); virtual ~ActorAnimation(); - virtual void itemAdded(const MWWorld::ConstPtr& item, int count); - virtual void itemRemoved(const MWWorld::ConstPtr& item, int count); + void itemAdded(const MWWorld::ConstPtr& item, int count) override; + void itemRemoved(const MWWorld::ConstPtr& item, int count) override; virtual bool isArrowAttached() const { return false; } - virtual bool useShieldAnimations() const; - bool updateCarriedLeftVisible(const int weaptype) const; + bool useShieldAnimations() const override; + bool updateCarriedLeftVisible(const int weaptype) const override; protected: osg::Group* getBoneByName(const std::string& boneName); diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 3835e26de8..29645a7c19 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -62,7 +62,7 @@ namespace : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN) { } - virtual void apply(osg::Node &node) + void apply(osg::Node &node) override { if (dynamic_cast(&node)) mToRemove.push_back(&node); @@ -70,7 +70,7 @@ namespace traverse(node); } - virtual void apply(osg::Drawable& drw) + void apply(osg::Drawable& drw) override { if (osgParticle::ParticleSystem* partsys = dynamic_cast(&drw)) mToRemove.push_back(partsys); @@ -98,7 +98,7 @@ namespace { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { unsigned int state = MWBase::Environment::get().getWorld()->getNightDayMode(); const unsigned int newState = node->asGroup()->getNumChildren() > state ? state : 0; @@ -123,7 +123,7 @@ namespace : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN) { } - virtual void apply(osg::Switch &switchNode) + void apply(osg::Switch &switchNode) override { if (switchNode.getName() == Constants::NightDayLabel) switchNode.addUpdateCallback(new DayNightCallback()); @@ -140,7 +140,7 @@ namespace { } - virtual void apply(osg::Switch& node) + void apply(osg::Switch& node) override { if (node.getName() == Constants::HerbalismLabel) { @@ -235,7 +235,7 @@ namespace { } - void apply(osg::Node& node) + void apply(osg::Node& node) override { if (SceneUtil::hasUserDescription(&node, "CustomBone")) { @@ -260,12 +260,12 @@ namespace { } - virtual void apply(osg::Node &node) + void apply(osg::Node &node) override { traverse(node); } - virtual void apply(osg::Group &group) + void apply(osg::Group &group) override { traverse(group); @@ -284,12 +284,12 @@ namespace } } - virtual void apply(osg::MatrixTransform &node) + void apply(osg::MatrixTransform &node) override { traverse(node); } - virtual void apply(osg::Geometry&) + void apply(osg::Geometry&) override { } }; @@ -313,12 +313,12 @@ namespace { } - virtual void apply(osg::Node &node) + void apply(osg::Node &node) override { traverse(node); } - virtual void apply(osg::Group &group) + void apply(osg::Group &group) override { traverse(group); @@ -337,12 +337,12 @@ namespace } } - virtual void apply(osg::MatrixTransform &node) + void apply(osg::MatrixTransform &node) override { traverse(node); } - virtual void apply(osg::Geometry&) + void apply(osg::Geometry&) override { } @@ -368,12 +368,12 @@ namespace { } - virtual void apply(osg::Node &node) + void apply(osg::Node &node) override { traverse(node); } - virtual void apply(osg::Group &group) + void apply(osg::Group &group) override { osg::Callback* callback = group.getUpdateCallback(); if (callback) @@ -390,12 +390,12 @@ namespace traverse(group); } - virtual void apply(osg::MatrixTransform &node) + void apply(osg::MatrixTransform &node) override { traverse(node); } - virtual void apply(osg::Geometry&) + void apply(osg::Geometry&) override { } @@ -407,20 +407,20 @@ namespace class CleanObjectRootVisitor : public RemoveVisitor { public: - virtual void apply(osg::Drawable& drw) + void apply(osg::Drawable& drw) override { applyDrawable(drw); } - virtual void apply(osg::Group& node) + void apply(osg::Group& node) override { applyNode(node); } - virtual void apply(osg::MatrixTransform& node) + void apply(osg::MatrixTransform& node) override { applyNode(node); } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { applyNode(node); } @@ -461,16 +461,16 @@ namespace class RemoveTriBipVisitor : public RemoveVisitor { public: - virtual void apply(osg::Drawable& drw) + void apply(osg::Drawable& drw) override { applyImpl(drw); } - virtual void apply(osg::Group& node) + void apply(osg::Group& node) override { traverse(node); } - virtual void apply(osg::MatrixTransform& node) + void apply(osg::MatrixTransform& node) override { traverse(node); } @@ -505,7 +505,7 @@ namespace MWRender } protected: - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { osg::BlendFunc* blendfunc (new osg::BlendFunc); stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); @@ -525,7 +525,7 @@ namespace MWRender stateset->addUniform(new osg::Uniform("colorMode", 0), osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) + void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) override { osg::Material* material = static_cast(stateset->getAttribute(osg::StateAttribute::MATERIAL)); material->setAlpha(osg::Material::FRONT_AND_BACK, mAlpha); @@ -586,7 +586,7 @@ namespace MWRender class ResetAccumRootCallback : public osg::NodeCallback { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::MatrixTransform* transform = static_cast(node); diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 8a1719db43..9d03831be5 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -45,7 +45,7 @@ class EffectAnimationTime : public SceneUtil::ControllerSource private: float mTime; public: - virtual float getValue(osg::NodeVisitor* nv); + float getValue(osg::NodeVisitor* nv) override; void addTime(float duration); void resetTime(float time); @@ -173,13 +173,13 @@ protected: std::shared_ptr getTimePtr() const { return mTimePtr; } - virtual float getValue(osg::NodeVisitor* nv); + float getValue(osg::NodeVisitor* nv) override; }; class NullAnimationTime : public SceneUtil::ControllerSource { public: - virtual float getValue(osg::NodeVisitor *nv) + float getValue(osg::NodeVisitor *nv) override { return 0.f; } @@ -506,7 +506,7 @@ class ObjectAnimation : public Animation { public: ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool animated, bool allowLight); - bool canBeHarvested() const; + bool canBeHarvested() const override; }; class UpdateVfxCallback : public osg::NodeCallback @@ -522,7 +522,7 @@ public: bool mFinished; EffectParams mParams; - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; private: double mStartingTime; diff --git a/apps/openmw/mwrender/bulletdebugdraw.hpp b/apps/openmw/mwrender/bulletdebugdraw.hpp index 30da3aa72c..30cabc4f94 100644 --- a/apps/openmw/mwrender/bulletdebugdraw.hpp +++ b/apps/openmw/mwrender/bulletdebugdraw.hpp @@ -39,19 +39,19 @@ public: void step(); - void drawLine(const btVector3& from,const btVector3& to,const btVector3& color); + void drawLine(const btVector3& from,const btVector3& to,const btVector3& color) override; - void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color); + void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color) override; - void reportErrorWarning(const char* warningString); + void reportErrorWarning(const char* warningString) override; - void draw3dText(const btVector3& location,const char* textString) {} + void draw3dText(const btVector3& location,const char* textString) override {} //0 for off, anything else for on. - void setDebugMode(int isOn); + void setDebugMode(int isOn) override; //0 for off, anything else for on. - int getDebugMode() const; + int getDebugMode() const override; }; diff --git a/apps/openmw/mwrender/camera.cpp b/apps/openmw/mwrender/camera.cpp index 0d6ed262b5..527dddb9d5 100644 --- a/apps/openmw/mwrender/camera.cpp +++ b/apps/openmw/mwrender/camera.cpp @@ -33,7 +33,7 @@ public: { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::Camera* cam = static_cast(node); diff --git a/apps/openmw/mwrender/characterpreview.cpp b/apps/openmw/mwrender/characterpreview.cpp index b2552e598d..89db3e5f46 100644 --- a/apps/openmw/mwrender/characterpreview.cpp +++ b/apps/openmw/mwrender/characterpreview.cpp @@ -41,7 +41,7 @@ namespace MWRender { } - virtual void operator () (osg::Node* node, osg::NodeVisitor* nv) + void operator () (osg::Node* node, osg::NodeVisitor* nv) override { if (!mRendered) { @@ -89,7 +89,7 @@ namespace MWRender { } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { if (osg::StateSet* stateset = node.getStateSet()) { @@ -432,7 +432,7 @@ namespace MWRender { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::Camera* cam = static_cast(node); diff --git a/apps/openmw/mwrender/characterpreview.hpp b/apps/openmw/mwrender/characterpreview.hpp index b71bffb627..3eb9688465 100644 --- a/apps/openmw/mwrender/characterpreview.hpp +++ b/apps/openmw/mwrender/characterpreview.hpp @@ -86,7 +86,7 @@ namespace MWRender protected: osg::ref_ptr mViewport; - virtual void onSetup(); + void onSetup() override; }; class UpdateCameraCallback; @@ -98,8 +98,8 @@ namespace MWRender protected: - virtual bool renderHeadOnly() { return true; } - virtual void onSetup(); + bool renderHeadOnly() override { return true; } + void onSetup() override; public: RaceSelectionPreview(osg::Group* parent, Resource::ResourceSystem* resourceSystem); diff --git a/apps/openmw/mwrender/creatureanimation.hpp b/apps/openmw/mwrender/creatureanimation.hpp index 071500d743..9169e41024 100644 --- a/apps/openmw/mwrender/creatureanimation.hpp +++ b/apps/openmw/mwrender/creatureanimation.hpp @@ -28,37 +28,37 @@ namespace MWRender CreatureWeaponAnimation(const MWWorld::Ptr &ptr, const std::string& model, Resource::ResourceSystem* resourceSystem); virtual ~CreatureWeaponAnimation() {} - virtual void equipmentChanged() { updateParts(); } + void equipmentChanged() override { updateParts(); } - virtual void showWeapons(bool showWeapon); + void showWeapons(bool showWeapon) override; - virtual bool getCarriedLeftShown() const { return mShowCarriedLeft; } - virtual void showCarriedLeft(bool show); + bool getCarriedLeftShown() const override { return mShowCarriedLeft; } + void showCarriedLeft(bool show) override; void updateParts(); void updatePart(PartHolderPtr& scene, int slot); - virtual void attachArrow(); - virtual void detachArrow(); - virtual void releaseArrow(float attackStrength); + void attachArrow() override; + void detachArrow() override; + void releaseArrow(float attackStrength) override; // WeaponAnimation - virtual osg::Group* getArrowBone(); - virtual osg::Node* getWeaponNode(); - virtual Resource::ResourceSystem* getResourceSystem(); - virtual void showWeapon(bool show) { showWeapons(show); } - virtual void setWeaponGroup(const std::string& group, bool relativeDuration) { mWeaponAnimationTime->setGroup(group, relativeDuration); } + osg::Group* getArrowBone() override; + osg::Node* getWeaponNode() override; + Resource::ResourceSystem* getResourceSystem() override; + void showWeapon(bool show) override { showWeapons(show); } + void setWeaponGroup(const std::string& group, bool relativeDuration) override { mWeaponAnimationTime->setGroup(group, relativeDuration); } - virtual void addControllers(); + void addControllers() override; - virtual osg::Vec3f runAnimation(float duration); + osg::Vec3f runAnimation(float duration) override; /// A relative factor (0-1) that decides if and how much the skeleton should be pitched /// to indicate the facing orientation of the character. - virtual void setPitchFactor(float factor) { mPitchFactor = factor; } + void setPitchFactor(float factor) override { mPitchFactor = factor; } protected: - virtual bool isArrowAttached() const; + bool isArrowAttached() const override; private: PartHolderPtr mWeapon; diff --git a/apps/openmw/mwrender/globalmap.cpp b/apps/openmw/mwrender/globalmap.cpp index afa83a1d7a..ba300accbc 100644 --- a/apps/openmw/mwrender/globalmap.cpp +++ b/apps/openmw/mwrender/globalmap.cpp @@ -70,7 +70,7 @@ namespace { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { if (mRendered) { @@ -105,7 +105,7 @@ namespace MWRender { } - virtual void doWork() + void doWork() override { osg::ref_ptr image = new osg::Image; image->allocateImage(mWidth, mHeight, 1, GL_RGB, GL_UNSIGNED_BYTE); diff --git a/apps/openmw/mwrender/landmanager.hpp b/apps/openmw/mwrender/landmanager.hpp index 0d37097d8b..ea73f11c2b 100644 --- a/apps/openmw/mwrender/landmanager.hpp +++ b/apps/openmw/mwrender/landmanager.hpp @@ -23,7 +23,7 @@ namespace MWRender /// @note Will return nullptr if not found. osg::ref_ptr getLand(int x, int y); - virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const; + void reportStats(unsigned int frameNumber, osg::Stats* stats) const override; private: int mLoadFlags; diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index aaa797ef15..feefb29f50 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -39,7 +39,7 @@ namespace { } - virtual void operator()(osg::Node* node, osg::NodeVisitor*) + void operator()(osg::Node* node, osg::NodeVisitor*) override { if (mRendered) node->setNodeMask(0); diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 30942d75fb..36213fc96d 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -145,7 +145,7 @@ public: void setBlinkStart(float value); void setBlinkStop(float value); - virtual float getValue(osg::NodeVisitor* nv); + float getValue(osg::NodeVisitor* nv) override; }; // -------------------------------------------------------------------------------- @@ -166,7 +166,7 @@ public: mOffset = offset; } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::MatrixTransform* transform = static_cast(node); osg::Matrix matrix = transform->getMatrix(); @@ -378,7 +378,7 @@ public: mDepth->setWriteMask(true); } - virtual void drawImplementation(osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) + void drawImplementation(osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) override { renderInfo.getState()->applyAttribute(mDepth); @@ -400,7 +400,7 @@ public: { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); float fov, aspect, zNear, zFar; diff --git a/apps/openmw/mwrender/npcanimation.hpp b/apps/openmw/mwrender/npcanimation.hpp index cf695c8786..7e55001daf 100644 --- a/apps/openmw/mwrender/npcanimation.hpp +++ b/apps/openmw/mwrender/npcanimation.hpp @@ -30,8 +30,8 @@ class HeadAnimationTime; class NpcAnimation : public ActorAnimation, public WeaponAnimation, public MWWorld::InventoryStoreListener { public: - virtual void equipmentChanged(); - virtual void permanentEffectAdded(const ESM::MagicEffect *magicEffect, bool isNew); + void equipmentChanged() override; + void permanentEffectAdded(const ESM::MagicEffect *magicEffect, bool isNew) override; public: typedef std::map PartBoneMap; @@ -104,9 +104,9 @@ private: static NpcType getNpcType(const MWWorld::Ptr& ptr); protected: - virtual void addControllers(); - virtual bool isArrowAttached() const; - virtual std::string getShieldMesh(MWWorld::ConstPtr shield) const; + void addControllers() override; + bool isArrowAttached() const override; + std::string getShieldMesh(MWWorld::ConstPtr shield) const override; public: /** @@ -122,35 +122,35 @@ public: bool disableSounds = false, ViewMode viewMode=VM_Normal, float firstPersonFieldOfView=55.f); virtual ~NpcAnimation(); - virtual void enableHeadAnimation(bool enable); + void enableHeadAnimation(bool enable) override; /// 1: the first person meshes follow the camera's rotation completely /// 0: the first person meshes follow the camera with a reduced factor, so you can look down at your own hands - virtual void setAccurateAiming(bool enabled); + void setAccurateAiming(bool enabled) override; - virtual void setWeaponGroup(const std::string& group, bool relativeDuration); + void setWeaponGroup(const std::string& group, bool relativeDuration) override; - virtual osg::Vec3f runAnimation(float timepassed); + osg::Vec3f runAnimation(float timepassed) override; /// A relative factor (0-1) that decides if and how much the skeleton should be pitched /// to indicate the facing orientation of the character. - virtual void setPitchFactor(float factor) { mPitchFactor = factor; } + void setPitchFactor(float factor) override { mPitchFactor = factor; } - virtual void showWeapons(bool showWeapon); + void showWeapons(bool showWeapon) override; - virtual bool getCarriedLeftShown() const { return mShowCarriedLeft; } - virtual void showCarriedLeft(bool show); + bool getCarriedLeftShown() const override { return mShowCarriedLeft; } + void showCarriedLeft(bool show) override; - virtual void attachArrow(); - virtual void detachArrow(); - virtual void releaseArrow(float attackStrength); + void attachArrow() override; + void detachArrow() override; + void releaseArrow(float attackStrength) override; - virtual osg::Group* getArrowBone(); - virtual osg::Node* getWeaponNode(); - virtual Resource::ResourceSystem* getResourceSystem(); + osg::Group* getArrowBone() override; + osg::Node* getWeaponNode() override; + Resource::ResourceSystem* getResourceSystem() override; // WeaponAnimation - virtual void showWeapon(bool show) { showWeapons(show); } + void showWeapon(bool show) override { showWeapons(show); } void setViewMode(ViewMode viewMode); @@ -162,12 +162,12 @@ public: /// Get the inventory slot that the given node path leads into, or -1 if not found. int getSlot(const osg::NodePath& path) const; - virtual void setVampire(bool vampire); + void setVampire(bool vampire) override; /// Set a translation offset (in object root space) to apply to meshes when in first person mode. void setFirstPersonOffset(const osg::Vec3f& offset); - virtual void updatePtr(const MWWorld::Ptr& updated); + void updatePtr(const MWWorld::Ptr& updated) override; /// Get a list of body parts that may be used by an NPC of given race and gender. /// @note This is a fixed size list, one list item for each ESM::PartReferenceType, may contain nullptr body parts. diff --git a/apps/openmw/mwrender/objectpaging.cpp b/apps/openmw/mwrender/objectpaging.cpp index c756a3fc7f..f74455d596 100644 --- a/apps/openmw/mwrender/objectpaging.cpp +++ b/apps/openmw/mwrender/objectpaging.cpp @@ -89,11 +89,11 @@ namespace MWRender class CanOptimizeCallback : public SceneUtil::Optimizer::IsOperationPermissibleForObjectCallback { public: - virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Drawable* node,unsigned int option) const + bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Drawable* node,unsigned int option) const override { return true; } - virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const + bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const override { return (node->getDataVariance() != osg::Object::DYNAMIC); } @@ -119,7 +119,7 @@ namespace MWRender } } - virtual osg::Node* operator() (const osg::Node* node) const + osg::Node* operator() (const osg::Node* node) const override { if (const osg::Drawable* d = node->asDrawable()) return operator()(d); @@ -222,7 +222,7 @@ namespace MWRender matrixTransform->setMatrix(newMatrix); } - virtual osg::Drawable* operator() (const osg::Drawable* drawable) const + osg::Drawable* operator() (const osg::Drawable* drawable) const override { if (dynamic_cast(drawable)) return nullptr; @@ -243,7 +243,7 @@ namespace MWRender else return const_cast(drawable); } - virtual osg::Callback* operator() (const osg::Callback* callback) const + osg::Callback* operator() (const osg::Callback* callback) const override { return nullptr; } @@ -281,13 +281,13 @@ namespace MWRender unsigned int mNumVerts = 0; }; - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { if (node.getStateSet()) mCurrentStateSet = node.getStateSet(); traverse(node); } - virtual void apply(osg::Geometry& geom) + void apply(osg::Geometry& geom) override { if (osg::Array* array = geom.getVertexArray()) mResult.mNumVerts += array->getNumElements(); @@ -328,7 +328,7 @@ namespace MWRender { public: DebugVisitor() : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN) {} - virtual void apply(osg::Drawable& node) + void apply(osg::Drawable& node) override { osg::ref_ptr m (new osg::Material); osg::Vec4f color(Misc::Rng::rollProbability(), Misc::Rng::rollProbability(), Misc::Rng::rollProbability(), 0.f); @@ -349,7 +349,7 @@ namespace MWRender public: AddRefnumMarkerVisitor(const ESM::RefNum &refnum) : osg::NodeVisitor(TRAVERSE_ALL_CHILDREN), mRefnum(refnum) {} ESM::RefNum mRefnum; - virtual void apply(osg::Geometry &node) + void apply(osg::Geometry &node) override { osg::ref_ptr marker (new RefnumMarker); marker->mRefnum = mRefnum; diff --git a/apps/openmw/mwrender/objectpaging.hpp b/apps/openmw/mwrender/objectpaging.hpp index 18fa30289a..ff32dadd4d 100644 --- a/apps/openmw/mwrender/objectpaging.hpp +++ b/apps/openmw/mwrender/objectpaging.hpp @@ -31,7 +31,7 @@ namespace MWRender osg::ref_ptr createChunk(float size, const osg::Vec2f& center, bool activeGrid, const osg::Vec3f& viewPoint, bool compile); - virtual unsigned int getNodeMask() override; + unsigned int getNodeMask() override; /// @return true if view needs rebuild bool enableObject(int type, const ESM::RefNum & refnum, const osg::Vec3f& pos, const osg::Vec2i& cell, bool enabled); diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 5c79a4d26e..fd80e0bfa9 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -89,7 +89,7 @@ namespace MWRender { } - virtual void setDefaults(osg::StateSet *stateset) + void setDefaults(osg::StateSet *stateset) override { osg::LightModel* lightModel = new osg::LightModel; stateset->setAttribute(lightModel, osg::StateAttribute::ON); @@ -106,7 +106,7 @@ namespace MWRender stateset->removeAttribute(osg::StateAttribute::POLYGONMODE); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor*) + void apply(osg::StateSet* stateset, osg::NodeVisitor*) override { osg::LightModel* lightModel = static_cast(stateset->getAttribute(osg::StateAttribute::LIGHTMODEL)); lightModel->setAmbientIntensity(mAmbientColor); @@ -166,7 +166,7 @@ namespace MWRender { } - virtual void doWork() + void doWork() override { try { @@ -701,7 +701,7 @@ namespace MWRender { } - virtual void operator () (osg::RenderInfo& renderInfo) const + void operator () (osg::RenderInfo& renderInfo) const override { std::lock_guard lock(mMutex); if (renderInfo.getState()->getFrameStamp()->getFrameNumber() >= mFrame) @@ -928,7 +928,7 @@ namespace MWRender : mWidth(width), mHeight(height), mImage(image) { } - virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* /*drawable*/) const + void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* /*drawable*/) const override { int screenW = renderInfo.getCurrentCamera()->getViewport()->width(); int screenH = renderInfo.getCurrentCamera()->getViewport()->height(); diff --git a/apps/openmw/mwrender/renderingmanager.hpp b/apps/openmw/mwrender/renderingmanager.hpp index 1f6f25ace2..ef28cf544e 100644 --- a/apps/openmw/mwrender/renderingmanager.hpp +++ b/apps/openmw/mwrender/renderingmanager.hpp @@ -98,7 +98,7 @@ namespace MWRender osgUtil::IncrementalCompileOperation* getIncrementalCompileOperation(); - MWRender::Objects& getObjects(); + MWRender::Objects& getObjects() override; Resource::ResourceSystem* getResourceSystem(); diff --git a/apps/openmw/mwrender/rotatecontroller.hpp b/apps/openmw/mwrender/rotatecontroller.hpp index 456a6dd200..9d4080ac6e 100644 --- a/apps/openmw/mwrender/rotatecontroller.hpp +++ b/apps/openmw/mwrender/rotatecontroller.hpp @@ -20,7 +20,7 @@ public: void setRotate(const osg::Quat& rotate); - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; protected: osg::Quat getWorldOrientation(osg::Node* node); diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 10fc630bdf..7ba490b921 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -119,12 +119,12 @@ public: } protected: - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { stateset->setAttributeAndModes(createAlphaTrackingUnlitMaterial(), osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) + void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) override { osg::Material* mat = static_cast(stateset->getAttribute(osg::StateAttribute::MATERIAL)); mat->setEmission(osg::Material::FRONT_AND_BACK, mEmissionColor); @@ -149,7 +149,7 @@ public: } protected: - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { osg::ref_ptr texEnv (new osg::TexEnvCombine); texEnv->setCombine_Alpha(osg::TexEnvCombine::MODULATE); @@ -162,7 +162,7 @@ protected: stateset->setTextureAttributeAndModes(1, texEnv, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) + void apply(osg::StateSet* stateset, osg::NodeVisitor* /*nv*/) override { osg::TexEnvCombine* texEnv = static_cast(stateset->getTextureAttribute(1, osg::StateAttribute::TEXENV)); texEnv->setConstantColor(mColor); @@ -201,7 +201,7 @@ public: } protected: - virtual void setDefaults(osg::StateSet *stateset) + void setDefaults(osg::StateSet *stateset) override { osg::ref_ptr texmat (new osg::TexMat); stateset->setTextureAttributeAndModes(0, texmat, osg::StateAttribute::ON); @@ -223,7 +223,7 @@ protected: stateset->setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); } - virtual void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) + void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) override { osg::TexMat* texMat = static_cast(stateset->getTextureAttribute(0, osg::StateAttribute::TEXMAT)); texMat->setMatrix(osg::Matrix::translate(osg::Vec3f(0, -mAnimationTimer, 0.f))); @@ -272,7 +272,7 @@ public: return mViewPoint; } - virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const + bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const override { if (nv->getVisitorType() == osg::NodeVisitor::CULL_VISITOR) { @@ -291,7 +291,7 @@ public: } } - osg::BoundingSphere computeBound() const + osg::BoundingSphere computeBound() const override { return osg::BoundingSphere(osg::Vec3f(0,0,0), 0); } @@ -299,7 +299,7 @@ public: class CullCallback : public osg::NodeCallback { public: - virtual void operator() (osg::Node* node, osg::NodeVisitor* nv) + void operator() (osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); @@ -351,7 +351,7 @@ public: { } - void apply(osg::Drawable& drw) + void apply(osg::Drawable& drw) override { osg::Geometry* geom = drw.asGeometry(); if (!geom) @@ -409,7 +409,7 @@ public: return mEnabled && viewPoint.z() < mWaterLevel; } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { if (isUnderwater()) return; @@ -521,7 +521,7 @@ public: mUpdater->mColor.b() = color.b(); } - virtual void adjustTransparency(const float ratio) + void adjustTransparency(const float ratio) override { mUpdater->mColor.a() = ratio; if (mSunGlareCallback) @@ -550,7 +550,7 @@ private: class DummyComputeBoundCallback : public osg::Node::ComputeBoundingSphereCallback { public: - virtual osg::BoundingSphere computeBound(const osg::Node& node) const { return osg::BoundingSphere(); } + osg::BoundingSphere computeBound(const osg::Node& node) const override { return osg::BoundingSphere(); } }; /// @param queryVisible If true, queries the amount of visible pixels. If false, queries the total amount of pixels. @@ -701,12 +701,12 @@ private: { } - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { stateset->setAttributeAndModes(createUnlitMaterial(), osg::StateAttribute::ON); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor*) + void apply(osg::StateSet* stateset, osg::NodeVisitor*) override { osg::Material* mat = static_cast(stateset->getAttribute(osg::StateAttribute::MATERIAL)); mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(0,0,0,mColor.a())); @@ -766,7 +766,7 @@ private: { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); @@ -851,7 +851,7 @@ private: mColor[i] = std::min(1.f, mColor[i]); } - virtual void operator ()(osg::Node* node, osg::NodeVisitor* nv) + void operator ()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); @@ -955,7 +955,7 @@ public: mGeom->removeUpdateCallback(mUpdater); } - virtual void adjustTransparency(const float ratio) + void adjustTransparency(const float ratio) override { mUpdater->mTransparency *= ratio; } @@ -1026,7 +1026,7 @@ private: { } - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { stateset->setTextureAttributeAndModes(0, mPhaseTex, osg::StateAttribute::ON); osg::ref_ptr texEnv = new osg::TexEnvCombine; @@ -1050,7 +1050,7 @@ private: stateset->setAttributeAndModes(createUnlitMaterial(), osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor*) + void apply(osg::StateSet* stateset, osg::NodeVisitor*) override { osg::TexEnvCombine* texEnv = static_cast(stateset->getTextureAttribute(0, osg::StateAttribute::TEXENV)); texEnv->setConstantColor(mMoonColor * mShadowBlend); @@ -1226,7 +1226,7 @@ void SkyManager::create() class RainCounter : public osgParticle::ConstantRateCounter { public: - virtual int numParticlesToCreate(double dt) const + int numParticlesToCreate(double dt) const override { // limit dt to avoid large particle emissions if there are jumps in the simulation time // 0.2 seconds is the same cap as used in Engine's frame loop @@ -1243,7 +1243,7 @@ public: { } - virtual void shoot(osgParticle::Particle* particle) const + void shoot(osgParticle::Particle* particle) const override { particle->setVelocity(mVelocity); particle->setAngle(osg::Vec3f(-mAngle, 0, (Misc::Rng::rollProbability() * 2 - 1) * osg::PI)); @@ -1259,11 +1259,11 @@ public: mAngle = angle; } - virtual osg::Object* cloneType() const + osg::Object* cloneType() const override { return new RainShooter; } - virtual osg::Object* clone(const osg::CopyOp &) const + osg::Object* clone(const osg::CopyOp &) const override { return new RainShooter(*this); } @@ -1289,14 +1289,14 @@ public: mAlpha = alpha; } - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { // need to create a deep copy of StateAttributes we will modify osg::Material* mat = static_cast(stateset->getAttribute(osg::StateAttribute::MATERIAL)); stateset->setAttribute(osg::clone(mat, osg::CopyOp::DEEP_COPY_ALL), osg::StateAttribute::ON); } - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* nv) + void apply(osg::StateSet* stateset, osg::NodeVisitor* nv) override { osg::Material* mat = static_cast(stateset->getAttribute(osg::StateAttribute::MATERIAL)); mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(0,0,0,mAlpha)); @@ -1315,7 +1315,7 @@ public: mAlphaUpdate = alphaUpdate; } - virtual void apply(osg::Node &node) + void apply(osg::Node &node) override { if (osg::StateSet* stateset = node.getStateSet()) { @@ -1368,7 +1368,7 @@ public: { } - virtual void setDefaults(osg::StateSet* stateset) + void setDefaults(osg::StateSet* stateset) override { osg::ref_ptr mat (new osg::Material); mat->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1)); @@ -1377,7 +1377,7 @@ public: stateset->setAttributeAndModes(mat, osg::StateAttribute::ON); } - virtual void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) + void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) override { AlphaFader::apply(stateset,nv); *mAlphaUpdate = mAlpha * 2.0; // mAlpha is limited to 0.6 so multiply by 2 to reach full intensity @@ -1400,21 +1400,21 @@ public: mPreviousCameraPosition = getCameraPosition(); } - virtual osg::Object *cloneType() const override + osg::Object *cloneType() const override { return nullptr; } - virtual osg::Object *clone(const osg::CopyOp &op) const override + osg::Object *clone(const osg::CopyOp &op) const override { return nullptr; } - virtual void operate(osgParticle::Particle *P, double dt) override + void operate(osgParticle::Particle *P, double dt) override { } - virtual void operateParticles(osgParticle::ParticleSystem *ps, double dt) override + void operateParticles(osgParticle::ParticleSystem *ps, double dt) override { osg::Vec3 position = getCameraPosition(); osg::Vec3 positionDifference = position - mPreviousCameraPosition; diff --git a/apps/openmw/mwrender/terrainstorage.hpp b/apps/openmw/mwrender/terrainstorage.hpp index c9ad94398b..90bf42b841 100644 --- a/apps/openmw/mwrender/terrainstorage.hpp +++ b/apps/openmw/mwrender/terrainstorage.hpp @@ -20,13 +20,13 @@ namespace MWRender TerrainStorage(Resource::ResourceSystem* resourceSystem, const std::string& normalMapPattern = "", const std::string& normalHeightMapPattern = "", bool autoUseNormalMaps = false, const std::string& specularMapPattern = "", bool autoUseSpecularMaps = false); ~TerrainStorage(); - virtual osg::ref_ptr getLand (int cellX, int cellY) override; - virtual const ESM::LandTexture* getLandTexture(int index, short plugin) override; + osg::ref_ptr getLand (int cellX, int cellY) override; + const ESM::LandTexture* getLandTexture(int index, short plugin) override; - virtual bool hasData(int cellX, int cellY) override; + bool hasData(int cellX, int cellY) override; /// Get bounds of the whole terrain in cell units - virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY) override; + void getBounds(float& minX, float& maxX, float& minY, float& maxY) override; LandManager* getLandManager() const; diff --git a/apps/openmw/mwrender/util.cpp b/apps/openmw/mwrender/util.cpp index 59a12794bd..e3fc48040f 100644 --- a/apps/openmw/mwrender/util.cpp +++ b/apps/openmw/mwrender/util.cpp @@ -21,7 +21,7 @@ class TextureOverrideVisitor : public osg::NodeVisitor { } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { int index = 0; osg::ref_ptr nodePtr(&node); diff --git a/apps/openmw/mwrender/util.hpp b/apps/openmw/mwrender/util.hpp index eebcfd9b06..a89baa22b1 100644 --- a/apps/openmw/mwrender/util.hpp +++ b/apps/openmw/mwrender/util.hpp @@ -27,7 +27,7 @@ namespace MWRender class NoTraverseCallback : public osg::NodeCallback { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { // no traverse() } diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index a1691d5d1f..b569f1bfab 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -65,7 +65,7 @@ class ClipCullNode : public osg::Group { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); @@ -98,7 +98,7 @@ class ClipCullNode : public osg::Group { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); osg::Vec3d eyePoint = cv->getEyePoint(); @@ -168,7 +168,7 @@ class InheritViewPointCallback : public osg::NodeCallback public: InheritViewPointCallback() {} - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); osg::ref_ptr modelViewMatrix = new osg::RefMatrix(*cv->getModelViewMatrix()); @@ -184,7 +184,7 @@ public: class FudgeCallback : public osg::NodeCallback { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); @@ -408,7 +408,7 @@ private: class DepthClampCallback : public osg::Drawable::DrawCallback { public: - virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const + void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const override { static bool supported = osg::isGLExtensionOrVersionSupported(renderInfo.getState()->getContextID(), "GL_ARB_depth_clamp", 3.3); if (!supported) diff --git a/apps/openmw/mwrender/weaponanimation.hpp b/apps/openmw/mwrender/weaponanimation.hpp index dac1b663d0..d02107333e 100644 --- a/apps/openmw/mwrender/weaponanimation.hpp +++ b/apps/openmw/mwrender/weaponanimation.hpp @@ -23,7 +23,7 @@ namespace MWRender void setGroup(const std::string& group, bool relativeTime); void updateStartTime(); - virtual float getValue(osg::NodeVisitor* nv); + float getValue(osg::NodeVisitor* nv) override; }; /// Handles attach & release of projectiles for ranged weapons diff --git a/apps/openmw/mwscript/aiextensions.cpp b/apps/openmw/mwscript/aiextensions.cpp index 2e426701c7..499c2f672d 100644 --- a/apps/openmw/mwscript/aiextensions.cpp +++ b/apps/openmw/mwscript/aiextensions.cpp @@ -40,7 +40,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -61,7 +61,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -89,7 +89,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -123,7 +123,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -165,7 +165,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -180,7 +180,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -237,7 +237,7 @@ namespace MWScript public: OpGetAiSetting(MWMechanics::CreatureStats::AiSetting index) : mIndex(index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -251,7 +251,7 @@ namespace MWScript public: OpModAiSetting(MWMechanics::CreatureStats::AiSetting index) : mIndex(index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); Interpreter::Type_Integer value = runtime[0].mInteger; @@ -270,7 +270,7 @@ namespace MWScript public: OpSetAiSetting(MWMechanics::CreatureStats::AiSetting index) : mIndex(index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); Interpreter::Type_Integer value = runtime[0].mInteger; @@ -288,7 +288,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -322,7 +322,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -358,7 +358,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -373,7 +373,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr observer = R()(runtime, false); // required=false @@ -395,7 +395,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr source = R()(runtime); @@ -418,7 +418,7 @@ namespace MWScript class OpGetTarget : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime &runtime) + void execute (Interpreter::Runtime &runtime) override { MWWorld::Ptr actor = R()(runtime); std::string testedTargetId = runtime.getStringLiteral (runtime[0].mInteger); @@ -448,7 +448,7 @@ namespace MWScript class OpStartCombat : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime &runtime) + void execute (Interpreter::Runtime &runtime) override { MWWorld::Ptr actor = R()(runtime); std::string targetID = runtime.getStringLiteral (runtime[0].mInteger); @@ -464,7 +464,7 @@ namespace MWScript class OpStopCombat : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr actor = R()(runtime); MWMechanics::CreatureStats& creatureStats = actor.getClass().getCreatureStats(actor); @@ -476,7 +476,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI(); @@ -488,7 +488,7 @@ namespace MWScript class OpFace : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime& runtime) + void execute(Interpreter::Runtime& runtime) override { MWWorld::Ptr actor = R()(runtime); diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index 6e959c0c0f..8bb6cc6ada 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -24,7 +24,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -37,7 +37,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -67,7 +67,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); diff --git a/apps/openmw/mwscript/cellextensions.cpp b/apps/openmw/mwscript/cellextensions.cpp index 13ef98c634..3564281561 100644 --- a/apps/openmw/mwscript/cellextensions.cpp +++ b/apps/openmw/mwscript/cellextensions.cpp @@ -30,7 +30,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWorld()->hasCellChanged() ? 1 : 0); } @@ -40,7 +40,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (MWBase::Environment::get().getStateManager()->getState() != MWBase::StateManager::State_NoGame) { @@ -63,7 +63,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (MWBase::Environment::get().getStateManager()->getState() != MWBase::StateManager::State_NoGame) { @@ -86,7 +86,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string cell = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -114,7 +114,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Integer x = runtime[0].mInteger; runtime.pop(); @@ -140,7 +140,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (!MWMechanics::getPlayer().isInCell()) { @@ -159,7 +159,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string name = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -185,7 +185,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (!MWMechanics::getPlayer().isInCell()) { @@ -206,7 +206,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Float level = runtime[0].mFloat; @@ -229,7 +229,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Float level = runtime[0].mFloat; diff --git a/apps/openmw/mwscript/compilercontext.hpp b/apps/openmw/mwscript/compilercontext.hpp index ca7efd77a1..00b10ea06d 100644 --- a/apps/openmw/mwscript/compilercontext.hpp +++ b/apps/openmw/mwscript/compilercontext.hpp @@ -25,22 +25,22 @@ namespace MWScript CompilerContext (Type type); /// Is the compiler allowed to declare local variables? - virtual bool canDeclareLocals() const; + bool canDeclareLocals() const override; /// 'l: long, 's': short, 'f': float, ' ': does not exist. - virtual char getGlobalType (const std::string& name) const; + char getGlobalType (const std::string& name) const override; - virtual std::pair getMemberType (const std::string& name, - const std::string& id) const; + std::pair getMemberType (const std::string& name, + const std::string& id) const override; ///< Return type of member variable \a name in script \a id or in script of reference of /// \a id /// \return first: 'l: long, 's': short, 'f': float, ' ': does not exist. /// second: true: script of reference - virtual bool isId (const std::string& name) const; + bool isId (const std::string& name) const override; ///< Does \a name match an ID, that can be referenced? - virtual bool isJournalId (const std::string& name) const; + bool isJournalId (const std::string& name) const override; ///< Does \a name match a journal ID? }; } diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index 9ed9204ad6..7b5bf47300 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -37,7 +37,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -107,7 +107,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -131,7 +131,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -202,7 +202,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -239,7 +239,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -312,7 +312,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -338,7 +338,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -362,7 +362,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); diff --git a/apps/openmw/mwscript/controlextensions.cpp b/apps/openmw/mwscript/controlextensions.cpp index 9567928638..5362759e10 100644 --- a/apps/openmw/mwscript/controlextensions.cpp +++ b/apps/openmw/mwscript/controlextensions.cpp @@ -35,7 +35,7 @@ namespace MWScript : mControl (control), mEnable (enable) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get() .getInputManager() @@ -53,7 +53,7 @@ namespace MWScript : mControl (control) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push(!MWBase::Environment::get().getInputManager()->getControlSwitch (mControl)); } @@ -63,7 +63,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode(); @@ -80,7 +80,7 @@ namespace MWScript OpClearMovementFlag (MWMechanics::CreatureStats::Flag flag) : mFlag (flag) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -97,7 +97,7 @@ namespace MWScript OpSetMovementFlag (MWMechanics::CreatureStats::Flag flag) : mFlag (flag) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -110,7 +110,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -124,7 +124,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -138,7 +138,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -152,7 +152,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -165,7 +165,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr(); MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats(ptr); @@ -183,7 +183,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr(); runtime.push(MWBase::Environment::get().getMechanicsManager()->isSneaking(ptr)); diff --git a/apps/openmw/mwscript/dialogueextensions.cpp b/apps/openmw/mwscript/dialogueextensions.cpp index 25c7f518ed..b99a043bf5 100644 --- a/apps/openmw/mwscript/dialogueextensions.cpp +++ b/apps/openmw/mwscript/dialogueextensions.cpp @@ -28,7 +28,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime, false); // required=false if (ptr.isEmpty()) @@ -57,7 +57,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string quest = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -73,7 +73,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string quest = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -89,7 +89,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string topic = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -102,7 +102,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWBase::DialogueManager* dialogue = MWBase::Environment::get().getDialogueManager(); while(arg0>0) @@ -127,7 +127,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -150,7 +150,7 @@ namespace MWScript { public: - virtual void execute(Interpreter::Runtime& runtime) + void execute(Interpreter::Runtime& runtime) override { MWBase::Environment::get().getDialogueManager()->goodbye(); } @@ -161,7 +161,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); Interpreter::Type_Integer value = runtime[0].mInteger; @@ -176,7 +176,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); Interpreter::Type_Integer value = runtime[0].mInteger; @@ -191,7 +191,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -204,7 +204,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -218,7 +218,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string faction1 = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -237,7 +237,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string faction1 = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -254,7 +254,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string faction1 = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -273,7 +273,7 @@ namespace MWScript class OpClearInfoActor : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); diff --git a/apps/openmw/mwscript/guiextensions.cpp b/apps/openmw/mwscript/guiextensions.cpp index 64f45b4c09..cb1e5cd91d 100644 --- a/apps/openmw/mwscript/guiextensions.cpp +++ b/apps/openmw/mwscript/guiextensions.cpp @@ -30,7 +30,7 @@ namespace MWScript OpEnableWindow (MWGui::GuiWindow window) : mWindow (window) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWindowManager()->allow (mWindow); } @@ -40,7 +40,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWindowManager()->enableRest(); } @@ -50,7 +50,7 @@ namespace MWScript class OpShowRestMenu : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr bed = R()(runtime, false); @@ -70,7 +70,7 @@ namespace MWScript : mDialogue (dialogue) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWindowManager()->pushGuiMode(mDialogue); } @@ -80,7 +80,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWindowManager()->readPressedButton()); } @@ -90,7 +90,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report(MWBase::Environment::get().getWindowManager()->toggleFogOfWar() ? "Fog of war -> On" : "Fog of war -> Off"); @@ -101,7 +101,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report(MWBase::Environment::get().getWindowManager()->toggleFullHelp() ? "Full help -> On" : "Full help -> Off"); @@ -112,7 +112,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string cell = (runtime.getStringLiteral (runtime[0].mInteger)); ::Misc::StringUtils::lowerCaseInPlace(cell); @@ -143,7 +143,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { const MWWorld::Store &cells = MWBase::Environment::get().getWorld ()->getStore().get(); @@ -166,7 +166,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { int arg=0; if(arg0>0) @@ -206,7 +206,7 @@ namespace MWScript class OpToggleMenus : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { bool state = MWBase::Environment::get().getWindowManager()->toggleHud(); runtime.getContext().report(state ? "GUI -> On" : "GUI -> Off"); diff --git a/apps/openmw/mwscript/interpretercontext.hpp b/apps/openmw/mwscript/interpretercontext.hpp index e7c2790ce5..c1481d6d0a 100644 --- a/apps/openmw/mwscript/interpretercontext.hpp +++ b/apps/openmw/mwscript/interpretercontext.hpp @@ -57,82 +57,82 @@ namespace MWScript InterpreterContext (MWScript::Locals *locals, const MWWorld::Ptr& reference); ///< The ownership of \a locals is not transferred. 0-pointer allowed. - virtual int getLocalShort (int index) const; + int getLocalShort (int index) const override; - virtual int getLocalLong (int index) const; + int getLocalLong (int index) const override; - virtual float getLocalFloat (int index) const; + float getLocalFloat (int index) const override; - virtual void setLocalShort (int index, int value); + void setLocalShort (int index, int value) override; - virtual void setLocalLong (int index, int value); + void setLocalLong (int index, int value) override; - virtual void setLocalFloat (int index, float value); + void setLocalFloat (int index, float value) override; using Interpreter::Context::messageBox; - virtual void messageBox (const std::string& message, - const std::vector& buttons); + void messageBox (const std::string& message, + const std::vector& buttons) override; - virtual void report (const std::string& message); + void report (const std::string& message) override; ///< By default, do nothing. - virtual int getGlobalShort (const std::string& name) const; + int getGlobalShort (const std::string& name) const override; - virtual int getGlobalLong (const std::string& name) const; + int getGlobalLong (const std::string& name) const override; - virtual float getGlobalFloat (const std::string& name) const; + float getGlobalFloat (const std::string& name) const override; - virtual void setGlobalShort (const std::string& name, int value); + void setGlobalShort (const std::string& name, int value) override; - virtual void setGlobalLong (const std::string& name, int value); + void setGlobalLong (const std::string& name, int value) override; - virtual void setGlobalFloat (const std::string& name, float value); + void setGlobalFloat (const std::string& name, float value) override; - virtual std::vector getGlobals () const; + std::vector getGlobals () const override; - virtual char getGlobalType (const std::string& name) const; + char getGlobalType (const std::string& name) const override; - virtual std::string getActionBinding(const std::string& action) const; + std::string getActionBinding(const std::string& action) const override; - virtual std::string getActorName() const; + std::string getActorName() const override; - virtual std::string getNPCRace() const; + std::string getNPCRace() const override; - virtual std::string getNPCClass() const; + std::string getNPCClass() const override; - virtual std::string getNPCFaction() const; + std::string getNPCFaction() const override; - virtual std::string getNPCRank() const; + std::string getNPCRank() const override; - virtual std::string getPCName() const; + std::string getPCName() const override; - virtual std::string getPCRace() const; + std::string getPCRace() const override; - virtual std::string getPCClass() const; + std::string getPCClass() const override; - virtual std::string getPCRank() const; + std::string getPCRank() const override; - virtual std::string getPCNextRank() const; + std::string getPCNextRank() const override; - virtual int getPCBounty() const; + int getPCBounty() const override; - virtual std::string getCurrentCellName() const; + std::string getCurrentCellName() const override; void executeActivation(MWWorld::Ptr ptr, MWWorld::Ptr actor); ///< Execute the activation action for this ptr. If ptr is mActivated, mark activation as handled. - virtual int getMemberShort (const std::string& id, const std::string& name, bool global) const; + int getMemberShort (const std::string& id, const std::string& name, bool global) const override; - virtual int getMemberLong (const std::string& id, const std::string& name, bool global) const; + int getMemberLong (const std::string& id, const std::string& name, bool global) const override; - virtual float getMemberFloat (const std::string& id, const std::string& name, bool global) const; + float getMemberFloat (const std::string& id, const std::string& name, bool global) const override; - virtual void setMemberShort (const std::string& id, const std::string& name, int value, bool global); + void setMemberShort (const std::string& id, const std::string& name, int value, bool global) override; - virtual void setMemberLong (const std::string& id, const std::string& name, int value, bool global); + void setMemberLong (const std::string& id, const std::string& name, int value, bool global) override; - virtual void setMemberFloat (const std::string& id, const std::string& name, float value, bool global); + void setMemberFloat (const std::string& id, const std::string& name, float value, bool global) override; MWWorld::Ptr getReference(bool required=true); ///< Reference, that the script is running from (can be empty) diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index 8ce891741c..a288d66730 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -84,7 +84,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWindowManager()->isGuiMode()); } @@ -94,7 +94,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Integer limit = runtime[0].mInteger; runtime.pop(); @@ -112,7 +112,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr target = R()(runtime, false); std::string name = runtime.getStringLiteral (runtime[0].mInteger); @@ -125,7 +125,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string name = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -137,7 +137,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string name = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -149,7 +149,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getFrameDuration()); } @@ -160,7 +160,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); MWBase::Environment::get().getWorld()->enable (ptr); @@ -172,7 +172,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); MWBase::Environment::get().getWorld()->disable (ptr); @@ -184,7 +184,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push (!ptr.getRefData().isEnabled()); @@ -195,7 +195,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string name = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -211,7 +211,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWindowManager ()->getPlayerSleeping()); } @@ -221,7 +221,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World* world = MWBase::Environment::get().getWorld(); runtime.push (world->getPlayer().getJumping()); @@ -232,7 +232,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWindowManager ()->wakeUpPlayer(); } @@ -242,7 +242,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (0); } @@ -253,7 +253,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -266,7 +266,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { InterpreterContext& context = static_cast (runtime.getContext()); @@ -283,7 +283,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -314,7 +314,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -326,7 +326,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_CollisionDebug); @@ -341,7 +341,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_CollisionDebug); @@ -355,7 +355,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_Wireframe); @@ -369,7 +369,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleBorders(); @@ -382,7 +382,7 @@ namespace MWScript class OpTogglePathgrid : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_Pathgrid); @@ -396,7 +396,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Float time = runtime[0].mFloat; runtime.pop(); @@ -409,7 +409,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Float time = runtime[0].mFloat; runtime.pop(); @@ -422,7 +422,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { Interpreter::Type_Float alpha = runtime[0].mFloat; runtime.pop(); @@ -438,7 +438,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report(MWBase::Environment::get().getWorld()->toggleWater() ? "Water -> On" : "Water -> Off"); @@ -449,7 +449,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report(MWBase::Environment::get().getWorld()->toggleWorld() ? "World -> On" : "World -> Off"); @@ -460,7 +460,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { // We are ignoring the DontSaveObject statement for now. Probably not worth // bothering with. The incompatibility we are creating should be marginal at most. @@ -471,7 +471,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (!MWBase::Environment::get().getWorld()->isFirstPerson()) MWBase::Environment::get().getWorld()->togglePOV(true); @@ -480,7 +480,7 @@ namespace MWScript class OpPcForce3rdPerson : public Interpreter::Opcode0 { - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { if (MWBase::Environment::get().getWorld()->isFirstPerson()) MWBase::Environment::get().getWorld()->togglePOV(true); @@ -490,7 +490,7 @@ namespace MWScript class OpPcGet3rdPerson : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime& runtime) + void execute(Interpreter::Runtime& runtime) override { runtime.push(!MWBase::Environment::get().getWorld()->isFirstPerson()); } @@ -502,7 +502,7 @@ namespace MWScript public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); @@ -522,7 +522,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -535,7 +535,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -580,7 +580,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -612,7 +612,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -643,7 +643,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -730,7 +730,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -760,7 +760,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -773,7 +773,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -787,7 +787,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -800,7 +800,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); std::string id = runtime.getStringLiteral(runtime[0].mInteger); @@ -821,7 +821,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push(MWBase::Environment::get().getWorld()->getTimeStamp().getHour()); } @@ -832,7 +832,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); int parameter = runtime[0].mInteger; @@ -851,7 +851,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { float param = runtime[0].mFloat; runtime.pop(); @@ -865,7 +865,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { } }; @@ -875,7 +875,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push (MWBase::Environment::get().getWorld()->getPlayerStandingOn(ptr)); @@ -887,7 +887,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push (MWBase::Environment::get().getWorld()->getActorStandingOn(ptr)); @@ -899,7 +899,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push (MWBase::Environment::get().getWorld()->getPlayerCollidingWith(ptr)); @@ -911,7 +911,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push (MWBase::Environment::get().getWorld()->getActorCollidingWith(ptr)); @@ -923,7 +923,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); float healthDiffPerSecond = runtime[0].mFloat; @@ -938,7 +938,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); float healthDiffPerSecond = runtime[0].mFloat; @@ -952,7 +952,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push(MWBase::Environment::get().getWorld()->getWindSpeed()); } @@ -963,7 +963,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -982,7 +982,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1001,7 +1001,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); world->enableTeleporting(Enable); @@ -1013,7 +1013,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); world->enableLevitation(Enable); @@ -1025,7 +1025,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime, false); std::string var = runtime.getStringLiteral(runtime[0].mInteger); @@ -1162,7 +1162,7 @@ namespace MWScript } public: - virtual void execute(Interpreter::Runtime& runtime) + void execute(Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime, false); if (!ptr.isEmpty()) @@ -1178,7 +1178,7 @@ namespace MWScript class OpToggleScripts : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleScripts(); @@ -1189,7 +1189,7 @@ namespace MWScript class OpToggleGodMode : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleGodMode(); @@ -1201,7 +1201,7 @@ namespace MWScript class OpCast : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1247,7 +1247,7 @@ namespace MWScript class OpExplodeSpell : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1284,7 +1284,7 @@ namespace MWScript class OpGoToJail : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World* world = MWBase::Environment::get().getWorld(); world->goToJail(); @@ -1294,7 +1294,7 @@ namespace MWScript class OpPayFine : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr player = MWMechanics::getPlayer(); player.getClass().getNpcStats(player).setBounty(0); @@ -1306,7 +1306,7 @@ namespace MWScript class OpPayFineThief : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr player = MWMechanics::getPlayer(); player.getClass().getNpcStats(player).setBounty(0); @@ -1318,7 +1318,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime &runtime) + void execute (Interpreter::Runtime &runtime) override { runtime.push (MWBase::Environment::get().getWorld()->isPlayerInJail()); } @@ -1328,7 +1328,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime &runtime) + void execute (Interpreter::Runtime &runtime) override { runtime.push (MWBase::Environment::get().getWorld()->isPlayerTraveling()); } @@ -1338,7 +1338,7 @@ namespace MWScript class OpBetaComment : public Interpreter::Opcode1 { public: - virtual void execute(Interpreter::Runtime &runtime, unsigned int arg0) + void execute(Interpreter::Runtime &runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime); @@ -1400,7 +1400,7 @@ namespace MWScript class OpAddToLevCreature : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { const std::string& levId = runtime.getStringLiteral(runtime[0].mInteger); runtime.pop(); @@ -1418,7 +1418,7 @@ namespace MWScript class OpRemoveFromLevCreature : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { const std::string& levId = runtime.getStringLiteral(runtime[0].mInteger); runtime.pop(); @@ -1436,7 +1436,7 @@ namespace MWScript class OpAddToLevItem : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { const std::string& levId = runtime.getStringLiteral(runtime[0].mInteger); runtime.pop(); @@ -1454,7 +1454,7 @@ namespace MWScript class OpRemoveFromLevItem : public Interpreter::Opcode0 { public: - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { const std::string& levId = runtime.getStringLiteral(runtime[0].mInteger); runtime.pop(); @@ -1473,7 +1473,7 @@ namespace MWScript class OpShowSceneGraph : public Interpreter::Opcode1 { public: - virtual void execute(Interpreter::Runtime &runtime, unsigned int arg0) + void execute(Interpreter::Runtime &runtime, unsigned int arg0) override { MWWorld::Ptr ptr = R()(runtime, false); @@ -1498,7 +1498,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_NavMesh); @@ -1512,7 +1512,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_ActorsPaths); @@ -1526,7 +1526,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { const auto navMeshNumber = runtime[0].mInteger; runtime.pop(); @@ -1546,7 +1546,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { // Broken in vanilla and deliberately no-op. runtime.push(0); @@ -1557,7 +1557,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleRenderMode (MWRender::Render_RecastMesh); diff --git a/apps/openmw/mwscript/scriptmanagerimp.hpp b/apps/openmw/mwscript/scriptmanagerimp.hpp index 50cc7afa81..7ddcd2489d 100644 --- a/apps/openmw/mwscript/scriptmanagerimp.hpp +++ b/apps/openmw/mwscript/scriptmanagerimp.hpp @@ -68,23 +68,23 @@ namespace MWScript Compiler::Context& compilerContext, int warningsMode, const std::vector& scriptBlacklist); - virtual void clear(); + void clear() override; - virtual bool run (const std::string& name, Interpreter::Context& interpreterContext); + bool run (const std::string& name, Interpreter::Context& interpreterContext) override; ///< Run the script with the given name (compile first, if not compiled yet) - virtual bool compile (const std::string& name); + bool compile (const std::string& name) override; ///< Compile script with the given namen /// \return Success? - virtual std::pair compileAll(); + std::pair compileAll() override; ///< Compile all scripts /// \return count, success - virtual const Compiler::Locals& getLocals (const std::string& name); + const Compiler::Locals& getLocals (const std::string& name) override; ///< Return locals for script \a name. - virtual GlobalScripts& getGlobalScripts(); + GlobalScripts& getGlobalScripts() override; }; } diff --git a/apps/openmw/mwscript/skyextensions.cpp b/apps/openmw/mwscript/skyextensions.cpp index efcef68275..2b6bf826f9 100644 --- a/apps/openmw/mwscript/skyextensions.cpp +++ b/apps/openmw/mwscript/skyextensions.cpp @@ -21,7 +21,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { bool enabled = MWBase::Environment::get().getWorld()->toggleSky(); @@ -33,7 +33,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWorld()->setMoonColour (false); } @@ -43,7 +43,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWorld()->setMoonColour (true); } @@ -53,7 +53,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWorld()->getMasserPhase()); } @@ -63,7 +63,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWorld()->getSecundaPhase()); } @@ -73,7 +73,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.push (MWBase::Environment::get().getWorld()->getCurrentWeather()); } @@ -83,7 +83,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string region = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -99,7 +99,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { std::string region = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); diff --git a/apps/openmw/mwscript/soundextensions.cpp b/apps/openmw/mwscript/soundextensions.cpp index fe6f7bac36..6eab758f19 100644 --- a/apps/openmw/mwscript/soundextensions.cpp +++ b/apps/openmw/mwscript/soundextensions.cpp @@ -26,7 +26,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -51,7 +51,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -63,7 +63,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string sound = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -76,7 +76,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string sound = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -89,7 +89,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string sound = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -113,7 +113,7 @@ namespace MWScript OpPlaySound3D (bool loop) : mLoop (loop) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -136,7 +136,7 @@ namespace MWScript OpPlaySoundVP3D (bool loop) : mLoop (loop) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -162,7 +162,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -178,7 +178,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp index 37751c6d41..58a943e1a9 100644 --- a/apps/openmw/mwscript/statsextensions.cpp +++ b/apps/openmw/mwscript/statsextensions.cpp @@ -51,7 +51,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -69,7 +69,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -91,7 +91,7 @@ namespace MWScript OpGetAttribute (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -114,7 +114,7 @@ namespace MWScript OpSetAttribute (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -136,7 +136,7 @@ namespace MWScript OpModAttribute (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -172,7 +172,7 @@ namespace MWScript OpGetDynamic (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); Interpreter::Type_Float value; @@ -201,7 +201,7 @@ namespace MWScript OpSetDynamic (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -227,7 +227,7 @@ namespace MWScript OpModDynamic (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { int peek = R::implicit ? 0 : runtime[0].mInteger; @@ -277,7 +277,7 @@ namespace MWScript OpModCurrentDynamic (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -315,7 +315,7 @@ namespace MWScript OpGetDynamicGetRatio (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -341,7 +341,7 @@ namespace MWScript OpGetSkill (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -360,7 +360,7 @@ namespace MWScript OpSetSkill (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -382,7 +382,7 @@ namespace MWScript OpModSkill (int index) : mIndex (index) {} - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -411,7 +411,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); MWWorld::Ptr player = world->getPlayerPtr(); @@ -423,7 +423,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); MWWorld::Ptr player = world->getPlayerPtr(); @@ -441,7 +441,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::World *world = MWBase::Environment::get().getWorld(); MWWorld::Ptr player = world->getPlayerPtr(); @@ -456,7 +456,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -481,7 +481,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -517,7 +517,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -534,7 +534,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -550,7 +550,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -572,7 +572,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr actor = R()(runtime, false); @@ -604,7 +604,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr actor = R()(runtime, false); @@ -643,7 +643,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr actor = R()(runtime, false); @@ -675,7 +675,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -717,7 +717,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -737,7 +737,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -754,7 +754,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -769,7 +769,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string id = runtime.getStringLiteral (runtime[0].mInteger); runtime[0].mInteger = MWBase::Environment::get().getMechanicsManager()->countDeaths (id); @@ -781,7 +781,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -813,7 +813,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -847,7 +847,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -883,7 +883,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -896,7 +896,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -909,7 +909,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::ConstPtr ptr = R()(runtime); @@ -928,7 +928,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = MWBase::Environment::get().getWorld ()->getPlayerPtr(); @@ -941,7 +941,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -973,7 +973,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -1000,7 +1000,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0) + void execute (Interpreter::Runtime& runtime, unsigned int arg0) override { MWWorld::ConstPtr ptr = R()(runtime, false); @@ -1025,7 +1025,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1060,7 +1060,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1097,7 +1097,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1116,7 +1116,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1135,7 +1135,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1151,7 +1151,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push(ptr.getClass().getNpcStats(ptr).isWerewolf()); @@ -1163,7 +1163,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); MWBase::Environment::get().getMechanicsManager()->setWerewolf(ptr, set); @@ -1175,7 +1175,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); MWBase::Environment::get().getMechanicsManager()->applyWerewolfAcrobatics(ptr); @@ -1187,7 +1187,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1217,7 +1217,7 @@ namespace MWScript class OpGetStat : public Interpreter::Opcode0 { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { // dummy runtime.push(0); @@ -1237,7 +1237,7 @@ namespace MWScript { } - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -1272,7 +1272,7 @@ namespace MWScript { } - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); MWMechanics::MagicEffects& effects = ptr.getClass().getCreatureStats(ptr).getMagicEffects(); @@ -1307,7 +1307,7 @@ namespace MWScript { } - virtual void execute(Interpreter::Runtime &runtime) + void execute(Interpreter::Runtime &runtime) override { MWWorld::Ptr ptr = R()(runtime); MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats(ptr); diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 3bc8cb1f0e..ce45729b3b 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -44,7 +44,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr from = R()(runtime); std::string name = runtime.getStringLiteral (runtime[0].mInteger); @@ -101,7 +101,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -117,7 +117,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); runtime.push(ptr.getCellRef().getScale()); @@ -129,7 +129,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -146,7 +146,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -181,7 +181,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -208,7 +208,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -235,7 +235,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -262,7 +262,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -318,7 +318,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -345,7 +345,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -412,7 +412,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -465,7 +465,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string itemID = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -518,7 +518,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { std::string itemID = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -565,7 +565,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr actor = pc ? MWMechanics::getPlayer() @@ -606,7 +606,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { const MWWorld::Ptr& ptr = R()(runtime); @@ -633,7 +633,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -669,7 +669,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -694,7 +694,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { const MWWorld::Ptr& ptr = R()(runtime); @@ -743,7 +743,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWWorld::Ptr ptr = R()(runtime); @@ -779,7 +779,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWorld()->resetActors(); } @@ -789,7 +789,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { MWBase::Environment::get().getWorld()->fixPosition(); } diff --git a/apps/openmw/mwscript/userextensions.cpp b/apps/openmw/mwscript/userextensions.cpp index 165a93062f..3f443304d7 100644 --- a/apps/openmw/mwscript/userextensions.cpp +++ b/apps/openmw/mwscript/userextensions.cpp @@ -21,7 +21,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report ("user1: not in use"); } @@ -31,7 +31,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { runtime.getContext().report ("user2: not in use"); } @@ -42,7 +42,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { // MWWorld::Ptr ptr = R()(runtime); @@ -55,7 +55,7 @@ namespace MWScript { public: - virtual void execute (Interpreter::Runtime& runtime) + void execute (Interpreter::Runtime& runtime) override { // MWWorld::Ptr ptr = R()(runtime); diff --git a/apps/openmw/mwsound/movieaudiofactory.cpp b/apps/openmw/mwsound/movieaudiofactory.cpp index b0bfd52e17..d8c1c928ee 100644 --- a/apps/openmw/mwsound/movieaudiofactory.cpp +++ b/apps/openmw/mwsound/movieaudiofactory.cpp @@ -57,13 +57,13 @@ namespace MWSound private: // MovieAudioDecoder overrides - virtual double getAudioClock() + double getAudioClock() override { return (double)getSampleOffset()/(double)mAudioContext->sample_rate - MWBase::Environment::get().getSoundManager()->getTrackTimeDelay(mAudioTrack); } - virtual void adjustAudioSettings(AVSampleFormat& sampleFormat, uint64_t& channelLayout, int& sampleRate) + void adjustAudioSettings(AVSampleFormat& sampleFormat, uint64_t& channelLayout, int& sampleRate) override { if (sampleFormat == AV_SAMPLE_FMT_U8P || sampleFormat == AV_SAMPLE_FMT_U8) sampleFormat = AV_SAMPLE_FMT_U8; diff --git a/apps/openmw/mwsound/movieaudiofactory.hpp b/apps/openmw/mwsound/movieaudiofactory.hpp index 6ec49a4d37..63b8fd7e90 100644 --- a/apps/openmw/mwsound/movieaudiofactory.hpp +++ b/apps/openmw/mwsound/movieaudiofactory.hpp @@ -8,7 +8,7 @@ namespace MWSound class MovieAudioFactory : public Video::MovieAudioFactory { - virtual std::shared_ptr createDecoder(Video::VideoState* videoState); + std::shared_ptr createDecoder(Video::VideoState* videoState) override; }; } diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openal_output.hpp index 6039d97d60..d9ca924a78 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openal_output.hpp @@ -59,41 +59,41 @@ namespace MWSound OpenAL_Output(const OpenAL_Output &rhs); public: - virtual std::vector enumerate(); - virtual bool init(const std::string &devname, const std::string &hrtfname, HrtfMode hrtfmode); - virtual void deinit(); + std::vector enumerate() override; + bool init(const std::string &devname, const std::string &hrtfname, HrtfMode hrtfmode) override; + void deinit() override; - virtual std::vector enumerateHrtf(); - virtual void setHrtf(const std::string &hrtfname, HrtfMode hrtfmode); + std::vector enumerateHrtf() override; + void setHrtf(const std::string &hrtfname, HrtfMode hrtfmode) override; - virtual std::pair loadSound(const std::string &fname); - virtual size_t unloadSound(Sound_Handle data); + std::pair loadSound(const std::string &fname) override; + size_t unloadSound(Sound_Handle data) override; - virtual bool playSound(Sound *sound, Sound_Handle data, float offset); - virtual bool playSound3D(Sound *sound, Sound_Handle data, float offset); - virtual void finishSound(Sound *sound); - virtual bool isSoundPlaying(Sound *sound); - virtual void updateSound(Sound *sound); + bool playSound(Sound *sound, Sound_Handle data, float offset) override; + bool playSound3D(Sound *sound, Sound_Handle data, float offset) override; + void finishSound(Sound *sound) override; + bool isSoundPlaying(Sound *sound) override; + void updateSound(Sound *sound) override; - virtual bool streamSound(DecoderPtr decoder, Stream *sound, bool getLoudnessData=false); - virtual bool streamSound3D(DecoderPtr decoder, Stream *sound, bool getLoudnessData); - virtual void finishStream(Stream *sound); - virtual double getStreamDelay(Stream *sound); - virtual double getStreamOffset(Stream *sound); - virtual float getStreamLoudness(Stream *sound); - virtual bool isStreamPlaying(Stream *sound); - virtual void updateStream(Stream *sound); + bool streamSound(DecoderPtr decoder, Stream *sound, bool getLoudnessData=false) override; + bool streamSound3D(DecoderPtr decoder, Stream *sound, bool getLoudnessData) override; + void finishStream(Stream *sound) override; + double getStreamDelay(Stream *sound) override; + double getStreamOffset(Stream *sound) override; + float getStreamLoudness(Stream *sound) override; + bool isStreamPlaying(Stream *sound) override; + void updateStream(Stream *sound) override; - virtual void startUpdate(); - virtual void finishUpdate(); + void startUpdate() override; + void finishUpdate() override; - virtual void updateListener(const osg::Vec3f &pos, const osg::Vec3f &atdir, const osg::Vec3f &updir, Environment env); + void updateListener(const osg::Vec3f &pos, const osg::Vec3f &atdir, const osg::Vec3f &updir, Environment env) override; - virtual void pauseSounds(int types); - virtual void resumeSounds(int types); + void pauseSounds(int types) override; + void resumeSounds(int types) override; - virtual void pauseActiveDevice(); - virtual void resumeActiveDevice(); + void pauseActiveDevice() override; + void resumeActiveDevice() override; OpenAL_Output(SoundManager &mgr); virtual ~OpenAL_Output(); diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index b3f612d7d6..37b099c027 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -169,111 +169,111 @@ namespace MWSound SoundManager(const VFS::Manager* vfs, bool useSound); virtual ~SoundManager(); - virtual void processChangedSettings(const Settings::CategorySettingVector& settings); + void processChangedSettings(const Settings::CategorySettingVector& settings) override; - virtual void stopMusic(); + void stopMusic() override; ///< Stops music if it's playing - virtual void streamMusic(const std::string& filename); + void streamMusic(const std::string& filename) override; ///< Play a soundifle /// \param filename name of a sound file in "Music/" in the data directory. - virtual bool isMusicPlaying(); + bool isMusicPlaying() override; ///< Returns true if music is playing - virtual void playPlaylist(const std::string &playlist); + void playPlaylist(const std::string &playlist) override; ///< Start playing music from the selected folder /// \param name of the folder that contains the playlist - virtual void playTitleMusic(); + void playTitleMusic() override; ///< Start playing title music - virtual void say(const MWWorld::ConstPtr &reference, const std::string& filename); + void say(const MWWorld::ConstPtr &reference, const std::string& filename) override; ///< Make an actor say some text. /// \param filename name of a sound file in "Sound/" in the data directory. - virtual void say(const std::string& filename); + void say(const std::string& filename) override; ///< Say some text, without an actor ref /// \param filename name of a sound file in "Sound/" in the data directory. - virtual bool sayActive(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const; + bool sayActive(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const override; ///< Is actor not speaking? - virtual bool sayDone(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const; + bool sayDone(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const override; ///< For scripting backward compatibility - virtual void stopSay(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()); + void stopSay(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) override; ///< Stop an actor speaking - virtual float getSaySoundLoudness(const MWWorld::ConstPtr& reference) const; + float getSaySoundLoudness(const MWWorld::ConstPtr& reference) const override; ///< Check the currently playing say sound for this actor /// and get an average loudness value (scale [0,1]) at the current time position. /// If the actor is not saying anything, returns 0. - virtual Stream *playTrack(const DecoderPtr& decoder, Type type); + Stream *playTrack(const DecoderPtr& decoder, Type type) override; ///< Play a 2D audio track, using a custom decoder - virtual void stopTrack(Stream *stream); + void stopTrack(Stream *stream) override; ///< Stop the given audio track from playing - virtual double getTrackTimeDelay(Stream *stream); + double getTrackTimeDelay(Stream *stream) override; ///< Retives the time delay, in seconds, of the audio track (must be a sound /// returned by \ref playTrack). Only intended to be called by the track /// decoder's read method. - virtual Sound *playSound(const std::string& soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0); + Sound *playSound(const std::string& soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0) override; ///< Play a sound, independently of 3D-position ///< @param offset Number of seconds into the sound to start playback. - virtual Sound *playSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId, + Sound *playSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId, float volume, float pitch, Type type=Type::Sfx, - PlayMode mode=PlayMode::Normal, float offset=0); + PlayMode mode=PlayMode::Normal, float offset=0) override; ///< Play a 3D sound attached to an MWWorld::Ptr. Will be updated automatically with the Ptr's position, unless Play_NoTrack is specified. ///< @param offset Number of seconds into the sound to start playback. - virtual Sound *playSound3D(const osg::Vec3f& initialPos, const std::string& soundId, - float volume, float pitch, Type type, PlayMode mode, float offset=0); + Sound *playSound3D(const osg::Vec3f& initialPos, const std::string& soundId, + float volume, float pitch, Type type, PlayMode mode, float offset=0) override; ///< Play a 3D sound at \a initialPos. If the sound should be moving, it must be updated using Sound::setPosition. ///< @param offset Number of seconds into the sound to start playback. - virtual void stopSound(Sound *sound); + void stopSound(Sound *sound) override; ///< Stop the given sound from playing /// @note no-op if \a sound is null - virtual void stopSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId); + void stopSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId) override; ///< Stop the given object from playing the given sound, - virtual void stopSound3D(const MWWorld::ConstPtr &reference); + void stopSound3D(const MWWorld::ConstPtr &reference) override; ///< Stop the given object from playing all sounds. - virtual void stopSound(const MWWorld::CellStore *cell); + void stopSound(const MWWorld::CellStore *cell) override; ///< Stop all sounds for the given cell. - virtual void fadeOutSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId, float duration); + void fadeOutSound3D(const MWWorld::ConstPtr &reference, const std::string& soundId, float duration) override; ///< Fade out given sound (that is already playing) of given object ///< @param reference Reference to object, whose sound is faded out ///< @param soundId ID of the sound to fade out. ///< @param duration Time until volume reaches 0. - virtual bool getSoundPlaying(const MWWorld::ConstPtr &reference, const std::string& soundId) const; + bool getSoundPlaying(const MWWorld::ConstPtr &reference, const std::string& soundId) const override; ///< Is the given sound currently playing on the given object? - virtual void pauseSounds(MWSound::BlockerType blocker, int types=int(Type::Mask)); + void pauseSounds(MWSound::BlockerType blocker, int types=int(Type::Mask)) override; ///< Pauses all currently playing sounds, including music. - virtual void resumeSounds(MWSound::BlockerType blocker); + void resumeSounds(MWSound::BlockerType blocker) override; ///< Resumes all previously paused sounds. - virtual void pausePlayback(); - virtual void resumePlayback(); + void pausePlayback() override; + void resumePlayback() override; - virtual void update(float duration); + void update(float duration) override; - virtual void setListenerPosDir(const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater); + void setListenerPosDir(const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater) override; - virtual void updatePtr (const MWWorld::ConstPtr& old, const MWWorld::ConstPtr& updated); + void updatePtr (const MWWorld::ConstPtr& old, const MWWorld::ConstPtr& updated) override; - virtual void clear(); + void clear() override; }; } diff --git a/apps/openmw/mwstate/statemanagerimp.hpp b/apps/openmw/mwstate/statemanagerimp.hpp index d71fae8501..11984b7f50 100644 --- a/apps/openmw/mwstate/statemanagerimp.hpp +++ b/apps/openmw/mwstate/statemanagerimp.hpp @@ -33,27 +33,27 @@ namespace MWState StateManager (const boost::filesystem::path& saves, const std::string& game); - virtual void requestQuit(); + void requestQuit() override; - virtual bool hasQuitRequest() const; + bool hasQuitRequest() const override; - virtual void askLoadRecent(); + void askLoadRecent() override; - virtual State getState() const; + State getState() const override; - virtual void newGame (bool bypass = false); + void newGame (bool bypass = false) override; ///< Start a new game. /// /// \param bypass Skip new game mechanics. - virtual void endGame(); + void endGame() override; - virtual void resumeGame(); + void resumeGame() override; - virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot); + void deleteGame (const MWState::Character *character, const MWState::Slot *slot) override; ///< Delete a saved game slot from this character. If all save slots are deleted, the character will be deleted too. - virtual void saveGame (const std::string& description, const Slot *slot = 0); + void saveGame (const std::string& description, const Slot *slot = 0) override; ///< Write a saved game to \a slot or create a new slot if \a slot == 0. /// /// \note Slot must belong to the current character. @@ -61,30 +61,30 @@ namespace MWState ///Saves a file, using supplied filename, overwritting if needed /** This is mostly used for quicksaving and autosaving, for they use the same name over and over again \param name Name of save, defaults to "Quicksave"**/ - virtual void quickSave(std::string name = "Quicksave"); + void quickSave(std::string name = "Quicksave") override; ///Loads the last saved file /** Used for quickload **/ - virtual void quickLoad(); + void quickLoad() override; - virtual void loadGame (const std::string& filepath); + void loadGame (const std::string& filepath) override; ///< Load a saved game directly from the given file path. This will search the CharacterManager /// for a Character containing this save file, and set this Character current if one was found. /// Otherwise, a new Character will be created. - virtual void loadGame (const Character *character, const std::string &filepath); + void loadGame (const Character *character, const std::string &filepath) override; ///< Load a saved game file belonging to the given character. - virtual Character *getCurrentCharacter (); + Character *getCurrentCharacter () override; ///< @note May return null. - virtual CharacterIterator characterBegin(); + CharacterIterator characterBegin() override; ///< Any call to SaveGame and getCurrentCharacter can invalidate the returned /// iterator. - virtual CharacterIterator characterEnd(); + CharacterIterator characterEnd() override; - virtual void update (float duration); + void update (float duration) override; }; } diff --git a/apps/openmw/mwworld/actionalchemy.hpp b/apps/openmw/mwworld/actionalchemy.hpp index 0f79d5c2d2..194ef308b9 100644 --- a/apps/openmw/mwworld/actionalchemy.hpp +++ b/apps/openmw/mwworld/actionalchemy.hpp @@ -8,7 +8,7 @@ namespace MWWorld class ActionAlchemy : public Action { bool mForce; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: ActionAlchemy(bool force=false); diff --git a/apps/openmw/mwworld/actionapply.hpp b/apps/openmw/mwworld/actionapply.hpp index 4a1d2aefa6..4350b7af4f 100644 --- a/apps/openmw/mwworld/actionapply.hpp +++ b/apps/openmw/mwworld/actionapply.hpp @@ -11,7 +11,7 @@ namespace MWWorld { std::string mId; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: @@ -24,7 +24,7 @@ namespace MWWorld int mSkillIndex; int mUsageType; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: diff --git a/apps/openmw/mwworld/actiondoor.hpp b/apps/openmw/mwworld/actiondoor.hpp index 2dc5ad8c13..4be61f5760 100644 --- a/apps/openmw/mwworld/actiondoor.hpp +++ b/apps/openmw/mwworld/actiondoor.hpp @@ -8,7 +8,7 @@ namespace MWWorld { class ActionDoor : public Action { - virtual void executeImp (const MWWorld::Ptr& actor); + void executeImp (const MWWorld::Ptr& actor) override; public: ActionDoor (const Ptr& object); diff --git a/apps/openmw/mwworld/actioneat.hpp b/apps/openmw/mwworld/actioneat.hpp index db21ffa179..ddc231d99a 100644 --- a/apps/openmw/mwworld/actioneat.hpp +++ b/apps/openmw/mwworld/actioneat.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionEat : public Action { - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: diff --git a/apps/openmw/mwworld/actionequip.hpp b/apps/openmw/mwworld/actionequip.hpp index 1b5e52dd8d..1ac3cb2360 100644 --- a/apps/openmw/mwworld/actionequip.hpp +++ b/apps/openmw/mwworld/actionequip.hpp @@ -9,7 +9,7 @@ namespace MWWorld { bool mForce; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: /// @param item to equip diff --git a/apps/openmw/mwworld/actionharvest.hpp b/apps/openmw/mwworld/actionharvest.hpp index b93ff7f109..2edc2f34e5 100644 --- a/apps/openmw/mwworld/actionharvest.hpp +++ b/apps/openmw/mwworld/actionharvest.hpp @@ -8,7 +8,7 @@ namespace MWWorld { class ActionHarvest : public Action { - virtual void executeImp (const MWWorld::Ptr& actor); + void executeImp (const MWWorld::Ptr& actor) override; public: ActionHarvest (const Ptr& container); diff --git a/apps/openmw/mwworld/actionopen.hpp b/apps/openmw/mwworld/actionopen.hpp index e36b971a24..e9f76c4d71 100644 --- a/apps/openmw/mwworld/actionopen.hpp +++ b/apps/openmw/mwworld/actionopen.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionOpen : public Action { - virtual void executeImp (const MWWorld::Ptr& actor); + void executeImp (const MWWorld::Ptr& actor) override; public: ActionOpen (const Ptr& container); diff --git a/apps/openmw/mwworld/actionread.hpp b/apps/openmw/mwworld/actionread.hpp index 7c4d7d2f45..6387933eba 100644 --- a/apps/openmw/mwworld/actionread.hpp +++ b/apps/openmw/mwworld/actionread.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionRead : public Action { - virtual void executeImp (const MWWorld::Ptr& actor); + void executeImp (const MWWorld::Ptr& actor) override; public: /// @param book or scroll to read diff --git a/apps/openmw/mwworld/actionrepair.hpp b/apps/openmw/mwworld/actionrepair.hpp index fc64522d8f..218077f5de 100644 --- a/apps/openmw/mwworld/actionrepair.hpp +++ b/apps/openmw/mwworld/actionrepair.hpp @@ -9,7 +9,7 @@ namespace MWWorld { bool mForce; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: /// @param item repair hammer diff --git a/apps/openmw/mwworld/actionsoulgem.hpp b/apps/openmw/mwworld/actionsoulgem.hpp index 6a8f220bc5..d2b14c9122 100644 --- a/apps/openmw/mwworld/actionsoulgem.hpp +++ b/apps/openmw/mwworld/actionsoulgem.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionSoulgem : public Action { - virtual void executeImp (const MWWorld::Ptr& actor); + void executeImp (const MWWorld::Ptr& actor) override; public: /// @param soulgem to use diff --git a/apps/openmw/mwworld/actiontake.hpp b/apps/openmw/mwworld/actiontake.hpp index fb8d2f4ceb..bb9c0d3800 100644 --- a/apps/openmw/mwworld/actiontake.hpp +++ b/apps/openmw/mwworld/actiontake.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionTake : public Action { - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: diff --git a/apps/openmw/mwworld/actiontalk.hpp b/apps/openmw/mwworld/actiontalk.hpp index 01738a0bb9..6dd70380ff 100644 --- a/apps/openmw/mwworld/actiontalk.hpp +++ b/apps/openmw/mwworld/actiontalk.hpp @@ -7,7 +7,7 @@ namespace MWWorld { class ActionTalk : public Action { - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: diff --git a/apps/openmw/mwworld/actionteleport.hpp b/apps/openmw/mwworld/actionteleport.hpp index bd7b236a40..0a981a418e 100644 --- a/apps/openmw/mwworld/actionteleport.hpp +++ b/apps/openmw/mwworld/actionteleport.hpp @@ -17,7 +17,7 @@ namespace MWWorld bool mTeleportFollowers; /// Teleports this actor and also teleports anyone following that actor. - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; /// Teleports only the given actor (internal use). void teleport(const Ptr &actor); diff --git a/apps/openmw/mwworld/actiontrap.hpp b/apps/openmw/mwworld/actiontrap.hpp index 5b0d429c48..fe51959d1b 100644 --- a/apps/openmw/mwworld/actiontrap.hpp +++ b/apps/openmw/mwworld/actiontrap.hpp @@ -12,7 +12,7 @@ namespace MWWorld std::string mSpellId; MWWorld::Ptr mTrapSource; - virtual void executeImp (const Ptr& actor); + void executeImp (const Ptr& actor) override; public: diff --git a/apps/openmw/mwworld/cellpreloader.cpp b/apps/openmw/mwworld/cellpreloader.cpp index bee6a957dc..c6f71df6cb 100644 --- a/apps/openmw/mwworld/cellpreloader.cpp +++ b/apps/openmw/mwworld/cellpreloader.cpp @@ -69,13 +69,13 @@ namespace MWWorld cell->forEach(visitor); } - virtual void abort() + void abort() override { mAbort = true; } /// Preload work to be called from the worker thread. - virtual void doWork() + void doWork() override { if (mIsExterior) { @@ -177,7 +177,7 @@ namespace MWWorld return true; } - virtual void doWork() + void doWork() override { for (unsigned int i=0; iupdateCache(mReferenceTime); } diff --git a/apps/openmw/mwworld/cells.cpp b/apps/openmw/mwworld/cells.cpp index bf107b422f..0603b9de50 100644 --- a/apps/openmw/mwworld/cells.cpp +++ b/apps/openmw/mwworld/cells.cpp @@ -376,7 +376,7 @@ public: MWWorld::Cells& mCells; - virtual MWWorld::CellStore* getCellStore(const ESM::CellId& cellId) + MWWorld::CellStore* getCellStore(const ESM::CellId& cellId) override { try { diff --git a/apps/openmw/mwworld/esmloader.hpp b/apps/openmw/mwworld/esmloader.hpp index b96af707ce..506105bebb 100644 --- a/apps/openmw/mwworld/esmloader.hpp +++ b/apps/openmw/mwworld/esmloader.hpp @@ -25,7 +25,7 @@ struct EsmLoader : public ContentLoader EsmLoader(MWWorld::ESMStore& store, std::vector& readers, ToUTF8::Utf8Encoder* encoder, Loading::Listener& listener); - void load(const boost::filesystem::path& filepath, int& index); + void load(const boost::filesystem::path& filepath, int& index) override; private: std::vector& mEsm; diff --git a/apps/openmw/mwworld/failedaction.hpp b/apps/openmw/mwworld/failedaction.hpp index bafbb6f2d8..2a201cdb3b 100644 --- a/apps/openmw/mwworld/failedaction.hpp +++ b/apps/openmw/mwworld/failedaction.hpp @@ -10,7 +10,7 @@ namespace MWWorld { std::string mMessage; - virtual void executeImp(const Ptr &actor); + void executeImp(const Ptr &actor) override; public: FailedAction(const std::string &message = std::string(), const Ptr& target = Ptr()); diff --git a/apps/openmw/mwworld/inventorystore.hpp b/apps/openmw/mwworld/inventorystore.hpp index 97ca931e74..6d669dd452 100644 --- a/apps/openmw/mwworld/inventorystore.hpp +++ b/apps/openmw/mwworld/inventorystore.hpp @@ -110,8 +110,8 @@ namespace MWWorld void fireEquipmentChangedEvent(const Ptr& actor); - virtual void storeEquipmentState (const MWWorld::LiveCellRefBase& ref, int index, ESM::InventoryState& inventory) const; - virtual void readEquipmentState (const MWWorld::ContainerStoreIterator& iter, int index, const ESM::InventoryState& inventory); + void storeEquipmentState (const MWWorld::LiveCellRefBase& ref, int index, ESM::InventoryState& inventory) const override; + void readEquipmentState (const MWWorld::ContainerStoreIterator& iter, int index, const ESM::InventoryState& inventory) override; ContainerStoreIterator findSlot (int slot) const; @@ -123,9 +123,9 @@ namespace MWWorld InventoryStore& operator= (const InventoryStore& store); - virtual InventoryStore* clone() { return new InventoryStore(*this); } + InventoryStore* clone() override { return new InventoryStore(*this); } - virtual ContainerStoreIterator add (const Ptr& itemPtr, int count, const Ptr& actorPtr, bool allowAutoEquip = true); + ContainerStoreIterator add (const Ptr& itemPtr, int count, const Ptr& actorPtr, bool allowAutoEquip = true) override; ///< Add the item pointed to by \a ptr to this container. (Stacks automatically if needed) /// Auto-equip items if specific conditions are fulfilled and allowAutoEquip is true (see the implementation). /// @@ -162,13 +162,13 @@ namespace MWWorld const MWMechanics::MagicEffects& getMagicEffects() const; ///< Return magic effects from worn items. - virtual bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2) const; + bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2) const override; ///< @return true if the two specified objects can stack with each other virtual int remove(const std::string& itemId, int count, const Ptr& actor); virtual int remove(const std::string& itemId, int count, const Ptr& actor, bool equipReplacement); - virtual int remove(const Ptr& item, int count, const Ptr& actor); + int remove(const Ptr& item, int count, const Ptr& actor) override; virtual int remove(const Ptr& item, int count, const Ptr& actor, bool equipReplacement); ///< Remove \a count item(s) designated by \a item from this inventory. /// @@ -209,12 +209,12 @@ namespace MWWorld void purgeEffect (short effectId, const std::string& sourceId, bool wholeSpell = false, int effectIndex=-1); ///< Remove a magic effect - virtual void clear(); + void clear() override; ///< Empty container. - virtual void writeState (ESM::InventoryState& state) const; + void writeState (ESM::InventoryState& state) const override; - virtual void readState (const ESM::InventoryState& state); + void readState (const ESM::InventoryState& state) override; }; } diff --git a/apps/openmw/mwworld/livecellref.hpp b/apps/openmw/mwworld/livecellref.hpp index 4b61c0a08d..414fde42bd 100644 --- a/apps/openmw/mwworld/livecellref.hpp +++ b/apps/openmw/mwworld/livecellref.hpp @@ -87,12 +87,12 @@ namespace MWWorld // The object that this instance is based on. const X* mBase; - virtual void load (const ESM::ObjectState& state); + void load (const ESM::ObjectState& state) override; ///< Load state into a LiveCellRef, that has already been initialised with base and class. /// /// \attention Must not be called with an invalid \a state. - virtual void save (ESM::ObjectState& state) const; + void save (ESM::ObjectState& state) const override; ///< Save LiveCellRef state into \a state. static bool checkState (const ESM::ObjectState& state); diff --git a/apps/openmw/mwworld/nullaction.hpp b/apps/openmw/mwworld/nullaction.hpp index 5461d87112..4ee1115e50 100644 --- a/apps/openmw/mwworld/nullaction.hpp +++ b/apps/openmw/mwworld/nullaction.hpp @@ -8,9 +8,9 @@ namespace MWWorld /// \brief Action: do nothing class NullAction : public Action { - virtual void executeImp (const Ptr& actor) {} + void executeImp (const Ptr& actor) override {} - virtual bool isNullAction() { return true; } + bool isNullAction() override { return true; } }; } diff --git a/apps/openmw/mwworld/projectilemanager.cpp b/apps/openmw/mwworld/projectilemanager.cpp index cc906e9327..2c6feef467 100644 --- a/apps/openmw/mwworld/projectilemanager.cpp +++ b/apps/openmw/mwworld/projectilemanager.cpp @@ -166,7 +166,7 @@ namespace MWWorld { } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::PositionAttitudeTransform* transform = static_cast(node); diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 6843762260..bbf41ad2e5 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -961,7 +961,7 @@ namespace MWWorld { } - virtual void doWork() + void doWork() override { try { diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index f119fa928a..d2406b602b 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -163,8 +163,8 @@ namespace MWWorld typedef SharedIterator iterator; // setUp needs to be called again after - virtual void clearDynamic(); - void setUp(); + void clearDynamic() override; + void setUp() override; const T *search(const std::string &id) const; const T *searchStatic(const std::string &id) const; @@ -186,22 +186,22 @@ namespace MWWorld iterator begin() const; iterator end() const; - size_t getSize() const; - int getDynamicSize() const; + size_t getSize() const override; + int getDynamicSize() const override; /// @note The record identifiers are listed in the order that the records were defined by the content files. - void listIdentifier(std::vector &list) const; + void listIdentifier(std::vector &list) const override; T *insert(const T &item); T *insertStatic(const T &item); - bool eraseStatic(const std::string &id); + bool eraseStatic(const std::string &id) override; bool erase(const std::string &id); bool erase(const T &item); - RecordId load(ESM::ESMReader &esm); - void write(ESM::ESMWriter& writer, Loading::Listener& progress) const; - RecordId read(ESM::ESMReader& reader); + RecordId load(ESM::ESMReader &esm) override; + void write(ESM::ESMWriter& writer, Loading::Listener& progress) const override; + RecordId read(ESM::ESMReader& reader) override; }; template <> @@ -224,11 +224,11 @@ namespace MWWorld /// Resize the internal store to hold at least \a num plugins. void resize(size_t num); - size_t getSize() const; + size_t getSize() const override; size_t getSize(size_t plugin) const; RecordId load(ESM::ESMReader &esm, size_t plugin); - RecordId load(ESM::ESMReader &esm); + RecordId load(ESM::ESMReader &esm) override; iterator begin(size_t plugin) const; iterator end(size_t plugin) const; @@ -244,7 +244,7 @@ namespace MWWorld virtual ~Store(); - size_t getSize() const; + size_t getSize() const override; iterator begin() const; iterator end() const; @@ -253,8 +253,8 @@ namespace MWWorld const ESM::Land *search(int x, int y) const; const ESM::Land *find(int x, int y) const; - RecordId load(ESM::ESMReader &esm); - void setUp(); + RecordId load(ESM::ESMReader &esm) override; + void setUp() override; private: bool mBuilt = false; }; @@ -304,10 +304,10 @@ namespace MWWorld const ESM::Cell *find(const std::string &id) const; const ESM::Cell *find(int x, int y) const; - virtual void clearDynamic(); - void setUp(); + void clearDynamic() override; + void setUp() override; - RecordId load(ESM::ESMReader &esm); + RecordId load(ESM::ESMReader &esm) override; iterator intBegin() const; iterator intEnd() const; @@ -320,11 +320,11 @@ namespace MWWorld // Return the northernmost cell in the easternmost column. const ESM::Cell *searchExtByRegion(const std::string &id) const; - size_t getSize() const; + size_t getSize() const override; size_t getExtSize() const; size_t getIntSize() const; - void listIdentifier(std::vector &list) const; + void listIdentifier(std::vector &list) const override; ESM::Cell *insert(const ESM::Cell &cell); @@ -351,10 +351,10 @@ namespace MWWorld Store(); void setCells(Store& cells); - RecordId load(ESM::ESMReader &esm); - size_t getSize() const; + RecordId load(ESM::ESMReader &esm) override; + size_t getSize() const override; - void setUp(); + void setUp() override; const ESM::Pathgrid *search(int x, int y) const; const ESM::Pathgrid *search(const std::string& name) const; @@ -412,13 +412,13 @@ namespace MWWorld const ESM::WeaponType *search(const int id) const; const ESM::WeaponType *find(const int id) const; - RecordId load(ESM::ESMReader &esm) { return RecordId(0, false); } + RecordId load(ESM::ESMReader &esm) override { return RecordId(0, false); } ESM::WeaponType* insert(const ESM::WeaponType &weaponType); - void setUp(); + void setUp() override; - size_t getSize() const; + size_t getSize() const override; iterator begin() const; iterator end() const; }; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 38bafa61bc..daef81b5c6 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -102,7 +102,7 @@ namespace MWWorld return mLoaders.insert(std::make_pair(extension, loader)).second; } - void load(const boost::filesystem::path& filepath, int& index) + void load(const boost::filesystem::path& filepath, int& index) override { LoadersContainer::iterator it(mLoaders.find(Misc::StringUtils::lowerCase(filepath.extension().string()))); if (it != mLoaders.end()) @@ -3123,9 +3123,9 @@ namespace MWWorld { } - virtual void visit (MWMechanics::EffectKey key, int /*effectIndex*/, + void visit (MWMechanics::EffectKey key, int /*effectIndex*/, const std::string& /*sourceName*/, const std::string& /*sourceId*/, int /*casterActorId*/, - float /*magnitude*/, float /*remainingTime*/ = -1, float /*totalTime*/ = -1) + float /*magnitude*/, float /*remainingTime*/ = -1, float /*totalTime*/ = -1) override { const ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); const auto magicEffect = store.get().find(key.mId); diff --git a/apps/wizard/componentselectionpage.hpp b/apps/wizard/componentselectionpage.hpp index ca43471084..2509b9f5ed 100644 --- a/apps/wizard/componentselectionpage.hpp +++ b/apps/wizard/componentselectionpage.hpp @@ -15,8 +15,8 @@ namespace Wizard public: ComponentSelectionPage(QWidget *parent); - int nextId() const; - virtual bool validatePage(); + int nextId() const override; + bool validatePage() override; private slots: void updateButton(QListWidgetItem *item); @@ -25,7 +25,7 @@ namespace Wizard MainWizard *mWizard; protected: - void initializePage(); + void initializePage() override; }; diff --git a/apps/wizard/conclusionpage.hpp b/apps/wizard/conclusionpage.hpp index 0e9abed72c..f5f27dfcab 100644 --- a/apps/wizard/conclusionpage.hpp +++ b/apps/wizard/conclusionpage.hpp @@ -15,13 +15,13 @@ namespace Wizard public: ConclusionPage(QWidget *parent); - int nextId() const; + int nextId() const override; private: MainWizard *mWizard; protected: - void initializePage(); + void initializePage() override; }; diff --git a/apps/wizard/existinginstallationpage.hpp b/apps/wizard/existinginstallationpage.hpp index 6012954642..bb229e2498 100644 --- a/apps/wizard/existinginstallationpage.hpp +++ b/apps/wizard/existinginstallationpage.hpp @@ -15,9 +15,9 @@ namespace Wizard public: ExistingInstallationPage(QWidget *parent); - int nextId() const; - virtual bool isComplete() const; - virtual bool validatePage(); + int nextId() const override; + bool isComplete() const override; + bool validatePage() override; private slots: void on_browseButton_clicked(); @@ -28,7 +28,7 @@ namespace Wizard MainWizard *mWizard; protected: - void initializePage(); + void initializePage() override; }; diff --git a/apps/wizard/importpage.hpp b/apps/wizard/importpage.hpp index 386cd59af0..412d39ac18 100644 --- a/apps/wizard/importpage.hpp +++ b/apps/wizard/importpage.hpp @@ -15,7 +15,7 @@ namespace Wizard public: ImportPage(QWidget *parent); - int nextId() const; + int nextId() const override; private: MainWizard *mWizard; diff --git a/apps/wizard/installationpage.hpp b/apps/wizard/installationpage.hpp index 822cd21cd8..cc1ccf5599 100644 --- a/apps/wizard/installationpage.hpp +++ b/apps/wizard/installationpage.hpp @@ -22,8 +22,8 @@ namespace Wizard InstallationPage(QWidget *parent); ~InstallationPage(); - int nextId() const; - virtual bool isComplete() const; + int nextId() const override; + bool isComplete() const override; private: MainWizard *mWizard; @@ -41,7 +41,7 @@ namespace Wizard void installationError(const QString &text, const QString &details); protected: - void initializePage(); + void initializePage() override; }; diff --git a/apps/wizard/installationtargetpage.hpp b/apps/wizard/installationtargetpage.hpp index ca3b505b7e..7cba295733 100644 --- a/apps/wizard/installationtargetpage.hpp +++ b/apps/wizard/installationtargetpage.hpp @@ -20,8 +20,8 @@ namespace Wizard public: InstallationTargetPage(QWidget *parent, const Files::ConfigurationManager &cfg); - int nextId() const; - virtual bool validatePage(); + int nextId() const override; + bool validatePage() override; private slots: void on_browseButton_clicked(); @@ -31,7 +31,7 @@ namespace Wizard const Files::ConfigurationManager &mCfgMgr; protected: - void initializePage(); + void initializePage() override; }; diff --git a/apps/wizard/intropage.hpp b/apps/wizard/intropage.hpp index 4ad9b4111b..c8cd690167 100644 --- a/apps/wizard/intropage.hpp +++ b/apps/wizard/intropage.hpp @@ -15,7 +15,7 @@ namespace Wizard public: IntroPage(QWidget *parent); - int nextId() const; + int nextId() const override; private: MainWizard *mWizard; diff --git a/apps/wizard/languageselectionpage.hpp b/apps/wizard/languageselectionpage.hpp index abc3edb98a..cc86ba9b37 100644 --- a/apps/wizard/languageselectionpage.hpp +++ b/apps/wizard/languageselectionpage.hpp @@ -15,13 +15,13 @@ namespace Wizard public: LanguageSelectionPage(QWidget *parent); - int nextId() const; + int nextId() const override; private: MainWizard *mWizard; protected: - void initializePage(); + void initializePage() override; }; } diff --git a/apps/wizard/mainwizard.hpp b/apps/wizard/mainwizard.hpp index a05013d986..8d9623baa1 100644 --- a/apps/wizard/mainwizard.hpp +++ b/apps/wizard/mainwizard.hpp @@ -81,8 +81,8 @@ namespace Wizard void importerStarted(); void importerFinished(int exitCode, QProcess::ExitStatus exitStatus); - void accept(); - void reject(); + void accept() override; + void reject() override; }; diff --git a/apps/wizard/methodselectionpage.hpp b/apps/wizard/methodselectionpage.hpp index 60941c651d..c189ea171f 100644 --- a/apps/wizard/methodselectionpage.hpp +++ b/apps/wizard/methodselectionpage.hpp @@ -15,7 +15,7 @@ namespace Wizard public: MethodSelectionPage(QWidget *parent); - int nextId() const; + int nextId() const override; private: MainWizard *mWizard; diff --git a/components/bsa/compressedbsafile.hpp b/components/bsa/compressedbsafile.hpp index a22d6e149b..3c28b5a5f8 100644 --- a/components/bsa/compressedbsafile.hpp +++ b/components/bsa/compressedbsafile.hpp @@ -88,10 +88,10 @@ namespace Bsa static BsaVersion detectVersion(std::string filePath); /// Read header information from the input source - virtual void readHeader(); + void readHeader() override; - Files::IStreamPtr getFile(const char* filePath); - Files::IStreamPtr getFile(const FileStruct* fileStruct); + Files::IStreamPtr getFile(const char* filePath) override; + Files::IStreamPtr getFile(const FileStruct* fileStruct) override; }; } diff --git a/components/bullethelpers/processtrianglecallback.hpp b/components/bullethelpers/processtrianglecallback.hpp index ee005b459e..b0d156754f 100644 --- a/components/bullethelpers/processtrianglecallback.hpp +++ b/components/bullethelpers/processtrianglecallback.hpp @@ -15,7 +15,7 @@ namespace BulletHelpers : mImpl(std::move(impl)) {} - void processTriangle(btVector3* triangle, int partId, int triangleIndex) override final + void processTriangle(btVector3* triangle, int partId, int triangleIndex) final { return mImpl(triangle, partId, triangleIndex); } diff --git a/components/compiler/controlparser.hpp b/components/compiler/controlparser.hpp index 59958fd902..fad8025b42 100644 --- a/components/compiler/controlparser.hpp +++ b/components/compiler/controlparser.hpp @@ -54,20 +54,20 @@ namespace Compiler void appendCode (std::vector& code) const; ///< store generated code in \a code. - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - void reset(); + void reset() override; ///< Reset parser to clean state. }; } diff --git a/components/compiler/declarationparser.hpp b/components/compiler/declarationparser.hpp index 43dd835705..c04f1dc268 100644 --- a/components/compiler/declarationparser.hpp +++ b/components/compiler/declarationparser.hpp @@ -22,20 +22,20 @@ namespace Compiler DeclarationParser (ErrorHandler& errorHandler, const Context& context, Locals& locals); - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - void reset(); + void reset() override; }; } diff --git a/components/compiler/discardparser.hpp b/components/compiler/discardparser.hpp index 2a7ed5544d..15e06756e2 100644 --- a/components/compiler/discardparser.hpp +++ b/components/compiler/discardparser.hpp @@ -21,24 +21,24 @@ namespace Compiler DiscardParser (ErrorHandler& errorHandler, const Context& context); - virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); + bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner); + bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - virtual void reset(); + void reset() override; ///< Reset parser to clean state. /// Returns TokenLoc object for value. If no value has been parsed, the TokenLoc diff --git a/components/compiler/exprparser.hpp b/components/compiler/exprparser.hpp index dd8259ee17..0e8ad88c67 100644 --- a/components/compiler/exprparser.hpp +++ b/components/compiler/exprparser.hpp @@ -67,28 +67,28 @@ namespace Compiler char getType() const; ///< Return type of parsed expression ('l' integer, 'f' float) - virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); + bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner); + bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - void reset(); + void reset() override; ///< Reset parser to clean state. char append (std::vector& code); diff --git a/components/compiler/fileparser.hpp b/components/compiler/fileparser.hpp index 00f96cff0a..b08ec9cdd3 100644 --- a/components/compiler/fileparser.hpp +++ b/components/compiler/fileparser.hpp @@ -36,23 +36,23 @@ namespace Compiler const Locals& getLocals() const; ///< get local variable declarations. - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - virtual void parseEOF (Scanner& scanner); + void parseEOF (Scanner& scanner) override; ///< Handle EOF token. - void reset(); + void reset() override; ///< Reset parser to clean state. }; } diff --git a/components/compiler/junkparser.hpp b/components/compiler/junkparser.hpp index 6dfbd97af4..0b42d4693a 100644 --- a/components/compiler/junkparser.hpp +++ b/components/compiler/junkparser.hpp @@ -15,24 +15,24 @@ namespace Compiler JunkParser (ErrorHandler& errorHandler, const Context& context, int ignoreKeyword = -1); - virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); + bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner); + bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? }; diff --git a/components/compiler/lineparser.hpp b/components/compiler/lineparser.hpp index cc32b95925..c434792d18 100644 --- a/components/compiler/lineparser.hpp +++ b/components/compiler/lineparser.hpp @@ -51,28 +51,28 @@ namespace Compiler ///< \param allowExpression Allow lines consisting of a naked expression /// (result is send to the messagebox interface) - virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); + bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner); + bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - void reset(); + void reset() override; ///< Reset parser to clean state. }; @@ -82,11 +82,11 @@ namespace Compiler std::string mArguments; protected: - virtual void visitedPlaceholder(Placeholder placeholder, char padding, int width, int precision, Notation notation); - virtual void visitedCharacter(char c) {} + void visitedPlaceholder(Placeholder placeholder, char padding, int width, int precision, Notation notation) override; + void visitedCharacter(char c) override {} public: - virtual void process(const std::string& message) + void process(const std::string& message) override { mArguments.clear(); ::Misc::MessageFormatParser::process(message); diff --git a/components/compiler/nullerrorhandler.hpp b/components/compiler/nullerrorhandler.hpp index 3dcff92508..d689fba630 100644 --- a/components/compiler/nullerrorhandler.hpp +++ b/components/compiler/nullerrorhandler.hpp @@ -9,10 +9,10 @@ namespace Compiler class NullErrorHandler : public ErrorHandler { - virtual void report (const std::string& message, const TokenLoc& loc, Type type); + void report (const std::string& message, const TokenLoc& loc, Type type) override; ///< Report error to the user. - virtual void report (const std::string& message, Type type); + void report (const std::string& message, Type type) override; ///< Report a file related error }; } diff --git a/components/compiler/quickfileparser.hpp b/components/compiler/quickfileparser.hpp index 440d910387..95e6b401ce 100644 --- a/components/compiler/quickfileparser.hpp +++ b/components/compiler/quickfileparser.hpp @@ -17,20 +17,20 @@ namespace Compiler QuickFileParser (ErrorHandler& errorHandler, const Context& context, Locals& locals); - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - virtual void parseEOF (Scanner& scanner); + void parseEOF (Scanner& scanner) override; ///< Handle EOF token. }; } diff --git a/components/compiler/scriptparser.hpp b/components/compiler/scriptparser.hpp index edabb9c5c8..d6dfe768cd 100644 --- a/components/compiler/scriptparser.hpp +++ b/components/compiler/scriptparser.hpp @@ -29,23 +29,23 @@ namespace Compiler void getCode (std::vector& code) const; ///< store generated code in \a code. - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? - virtual void parseEOF (Scanner& scanner); + void parseEOF (Scanner& scanner) override; ///< Handle EOF token. - void reset(); + void reset() override; ///< Reset parser to clean state. }; } diff --git a/components/compiler/skipparser.hpp b/components/compiler/skipparser.hpp index 239c8bb02c..4be90f3a1e 100644 --- a/components/compiler/skipparser.hpp +++ b/components/compiler/skipparser.hpp @@ -15,24 +15,24 @@ namespace Compiler SkipParser (ErrorHandler& errorHandler, const Context& context); - virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner); + bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle an int token. /// \return fetch another token? - virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner); + bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a float token. /// \return fetch another token? - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? }; diff --git a/components/compiler/streamerrorhandler.hpp b/components/compiler/streamerrorhandler.hpp index 1f3b6e1ece..ad34166953 100644 --- a/components/compiler/streamerrorhandler.hpp +++ b/components/compiler/streamerrorhandler.hpp @@ -20,10 +20,10 @@ namespace Compiler StreamErrorHandler (const StreamErrorHandler&); StreamErrorHandler& operator= (const StreamErrorHandler&); - virtual void report (const std::string& message, const TokenLoc& loc, Type type); + void report (const std::string& message, const TokenLoc& loc, Type type) override; ///< Report error to the user. - virtual void report (const std::string& message, Type type); + void report (const std::string& message, Type type) override; ///< Report a file related error public: diff --git a/components/compiler/stringparser.hpp b/components/compiler/stringparser.hpp index 72dab05801..1976628360 100644 --- a/components/compiler/stringparser.hpp +++ b/components/compiler/stringparser.hpp @@ -30,16 +30,16 @@ namespace Compiler StringParser (ErrorHandler& errorHandler, const Context& context, Literals& literals); - virtual bool parseName (const std::string& name, const TokenLoc& loc, - Scanner& scanner); + bool parseName (const std::string& name, const TokenLoc& loc, + Scanner& scanner) override; ///< Handle a name token. /// \return fetch another token? - virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner); + bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a keyword token. /// \return fetch another token? - virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner); + bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner) override; ///< Handle a special character token. /// \return fetch another token? @@ -49,7 +49,7 @@ namespace Compiler void smashCase(); ///< Transform all scanned strings to lower case - void reset(); + void reset() override; ///< Reset parser to clean state (this includes the smashCase function). /// Returns TokenLoc object for string. If no string has been parsed, the TokenLoc diff --git a/components/contentselector/model/contentmodel.hpp b/components/contentselector/model/contentmodel.hpp index 80cd6e4c3b..030865b35a 100644 --- a/components/contentselector/model/contentmodel.hpp +++ b/components/contentselector/model/contentmodel.hpp @@ -28,20 +28,20 @@ namespace ContentSelectorModel void setEncoding(const QString &encoding); - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role) const; - Qt::ItemFlags flags(const QModelIndex &index) const; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + QVariant data(const QModelIndex &index, int role) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()); - bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()); + bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) override; + bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) override; - Qt::DropActions supportedDropActions() const; - QStringList mimeTypes() const; - QMimeData *mimeData(const QModelIndexList &indexes) const; - bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); + Qt::DropActions supportedDropActions() const override; + QStringList mimeTypes() const override; + QMimeData *mimeData(const QModelIndexList &indexes) const override; + bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override; void addFiles(const QString &path); void clearFiles(); diff --git a/components/contentselector/model/modelitem.hpp b/components/contentselector/model/modelitem.hpp index 57214b09cf..e4ea7acc6a 100644 --- a/components/contentselector/model/modelitem.hpp +++ b/components/contentselector/model/modelitem.hpp @@ -26,7 +26,7 @@ namespace ContentSelectorModel void appendChild(ModelItem *child); void removeChild(int row); - bool hasFormat(const QString &mimetype) const; + bool hasFormat(const QString &mimetype) const override; //virtual bool acceptChild(ModelItem *child); diff --git a/components/contentselector/view/combobox.hpp b/components/contentselector/view/combobox.hpp index e3888af2c7..c57a5f1169 100644 --- a/components/contentselector/view/combobox.hpp +++ b/components/contentselector/view/combobox.hpp @@ -22,7 +22,7 @@ namespace ContentSelectorView QString mPlaceholderText; protected: - void paintEvent(QPaintEvent *); + void paintEvent(QPaintEvent *) override; QRegExpValidator *mValidator; }; } diff --git a/components/debug/debugging.hpp b/components/debug/debugging.hpp index 1cae4b0065..39390446ff 100644 --- a/components/debug/debugging.hpp +++ b/components/debug/debugging.hpp @@ -89,7 +89,7 @@ namespace Debug mColors[NoLevel] = Reset; } - virtual std::streamsize writeImpl(const char *str, std::streamsize size, Level debugLevel) + std::streamsize writeImpl(const char *str, std::streamsize size, Level debugLevel) override { out.write (str, size); out.flush(); diff --git a/components/debug/gldebug.hpp b/components/debug/gldebug.hpp index 823d4f36fa..8be747afe8 100644 --- a/components/debug/gldebug.hpp +++ b/components/debug/gldebug.hpp @@ -10,7 +10,7 @@ namespace Debug public: EnableGLDebugOperation(); - virtual void operator()(osg::GraphicsContext* graphicsContext); + void operator()(osg::GraphicsContext* graphicsContext) override; private: OpenThreads::Mutex mMutex; diff --git a/components/esm/variantimp.hpp b/components/esm/variantimp.hpp index 1dc20c21f2..e7ac722b1e 100644 --- a/components/esm/variantimp.hpp +++ b/components/esm/variantimp.hpp @@ -75,25 +75,25 @@ namespace ESM ///< Calling the constructor with an incompatible data type will result in a silent /// default initialisation. - virtual VariantDataBase *clone() const; + VariantDataBase *clone() const override; - virtual std::string getString (bool default_ = false) const; + std::string getString (bool default_ = false) const override; ///< Will throw an exception, if value can not be represented as a string. /// /// \note Numeric values are not converted to strings. /// /// \param default_ Return a default value instead of throwing an exception. - virtual void setString (const std::string& value); + void setString (const std::string& value) override; ///< Will throw an exception, if type is not compatible with string. - virtual void read (ESMReader& esm, Variant::Format format, VarType type); + void read (ESMReader& esm, Variant::Format format, VarType type) override; ///< If \a type is not supported by \a format, an exception is thrown via ESMReader::fail - virtual void write (ESMWriter& esm, Variant::Format format, VarType type) const; + void write (ESMWriter& esm, Variant::Format format, VarType type) const override; ///< If \a type is not supported by \a format, an exception is thrown. - virtual bool isEqual (const VariantDataBase& value) const; + bool isEqual (const VariantDataBase& value) const override; ///< If the (C++) type of \a value does not match the type of *this, an exception is thrown. }; @@ -107,32 +107,32 @@ namespace ESM ///< Calling the constructor with an incompatible data type will result in a silent /// default initialisation. - virtual VariantDataBase *clone() const; + VariantDataBase *clone() const override; - virtual int getInteger (bool default_ = false) const; + int getInteger (bool default_ = false) const override; ///< Will throw an exception, if value can not be represented as an integer (implicit /// casting of float values is permitted). /// /// \param default_ Return a default value instead of throwing an exception. - virtual float getFloat (bool default_ = false) const; + float getFloat (bool default_ = false) const override; ///< Will throw an exception, if value can not be represented as a float value. /// /// \param default_ Return a default value instead of throwing an exception. - virtual void setInteger (int value); + void setInteger (int value) override; ///< Will throw an exception, if type is not compatible with integer. - virtual void setFloat (float value); + void setFloat (float value) override; ///< Will throw an exception, if type is not compatible with float. - virtual void read (ESMReader& esm, Variant::Format format, VarType type); + void read (ESMReader& esm, Variant::Format format, VarType type) override; ///< If \a type is not supported by \a format, an exception is thrown via ESMReader::fail - virtual void write (ESMWriter& esm, Variant::Format format, VarType type) const; + void write (ESMWriter& esm, Variant::Format format, VarType type) const override; ///< If \a type is not supported by \a format, an exception is thrown. - virtual bool isEqual (const VariantDataBase& value) const; + bool isEqual (const VariantDataBase& value) const override; ///< If the (C++) type of \a value does not match the type of *this, an exception is thrown. }; @@ -146,32 +146,32 @@ namespace ESM ///< Calling the constructor with an incompatible data type will result in a silent /// default initialisation. - virtual VariantDataBase *clone() const; + VariantDataBase *clone() const override; - virtual int getInteger (bool default_ = false) const; + int getInteger (bool default_ = false) const override; ///< Will throw an exception, if value can not be represented as an integer (implicit /// casting of float values is permitted). /// /// \param default_ Return a default value instead of throwing an exception. - virtual float getFloat (bool default_ = false) const; + float getFloat (bool default_ = false) const override; ///< Will throw an exception, if value can not be represented as a float value. /// /// \param default_ Return a default value instead of throwing an exception. - virtual void setInteger (int value); + void setInteger (int value) override; ///< Will throw an exception, if type is not compatible with integer. - virtual void setFloat (float value); + void setFloat (float value) override; ///< Will throw an exception, if type is not compatible with float. - virtual void read (ESMReader& esm, Variant::Format format, VarType type); + void read (ESMReader& esm, Variant::Format format, VarType type) override; ///< If \a type is not supported by \a format, an exception is thrown via ESMReader::fail - virtual void write (ESMWriter& esm, Variant::Format format, VarType type) const; + void write (ESMWriter& esm, Variant::Format format, VarType type) const override; ///< If \a type is not supported by \a format, an exception is thrown. - virtual bool isEqual (const VariantDataBase& value) const; + bool isEqual (const VariantDataBase& value) const override; ///< If the (C++) type of \a value does not match the type of *this, an exception is thrown. }; } diff --git a/components/esmterrain/storage.hpp b/components/esmterrain/storage.hpp index c645311401..68e71574ee 100644 --- a/components/esmterrain/storage.hpp +++ b/components/esmterrain/storage.hpp @@ -60,7 +60,7 @@ namespace ESMTerrain virtual osg::ref_ptr getLand (int cellX, int cellY)= 0; virtual const ESM::LandTexture* getLandTexture(int index, short plugin) = 0; /// Get bounds of the whole terrain in cell units - virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY) = 0; + void getBounds(float& minX, float& maxX, float& minY, float& maxY) override = 0; /// Get the minimum and maximum heights of a terrain region. /// @note Will only be called for chunks with size = minBatchSize, i.e. leafs of the quad tree. @@ -70,7 +70,7 @@ namespace ESMTerrain /// @param min min height will be stored here /// @param max max height will be stored here /// @return true if there was data available for this terrain chunk - virtual bool getMinMaxHeights (float size, const osg::Vec2f& center, float& min, float& max); + bool getMinMaxHeights (float size, const osg::Vec2f& center, float& min, float& max) override; /// Fill vertex buffers for a terrain chunk. /// @note May be called from background threads. Make sure to only call thread-safe functions from here! @@ -82,10 +82,10 @@ namespace ESMTerrain /// @param positions buffer to write vertices /// @param normals buffer to write vertex normals /// @param colours buffer to write vertex colours - virtual void fillVertexBuffers (int lodLevel, float size, const osg::Vec2f& center, + void fillVertexBuffers (int lodLevel, float size, const osg::Vec2f& center, osg::ref_ptr positions, osg::ref_ptr normals, - osg::ref_ptr colours); + osg::ref_ptr colours) override; /// Create textures holding layer blend values for a terrain chunk. /// @note The terrain chunk shouldn't be larger than one cell since otherwise we might @@ -95,18 +95,18 @@ namespace ESMTerrain /// @param chunkCenter center of the chunk in cell units /// @param blendmaps created blendmaps will be written here /// @param layerList names of the layer textures used will be written here - virtual void getBlendmaps (float chunkSize, const osg::Vec2f& chunkCenter, ImageVector& blendmaps, - std::vector& layerList); + void getBlendmaps (float chunkSize, const osg::Vec2f& chunkCenter, ImageVector& blendmaps, + std::vector& layerList) override; - virtual float getHeightAt (const osg::Vec3f& worldPos); + float getHeightAt (const osg::Vec3f& worldPos) override; /// Get the transformation factor for mapping cell units to world units. - virtual float getCellWorldSize(); + float getCellWorldSize() override; /// Get the number of vertices on one side for each cell. Should be (power of two)+1 - virtual int getCellVertices(); + int getCellVertices() override; - virtual int getBlendmapScale(float chunkSize); + int getBlendmapScale(float chunkSize) override; float getVertexHeight (const ESM::Land::LandData* data, int x, int y) { diff --git a/components/files/constrainedfilestream.cpp b/components/files/constrainedfilestream.cpp index 419af0d6c2..d2802218f0 100644 --- a/components/files/constrainedfilestream.cpp +++ b/components/files/constrainedfilestream.cpp @@ -37,7 +37,7 @@ namespace Files mOrigin = start; } - virtual int_type underflow() + int_type underflow() override { if(gptr() == egptr()) { @@ -53,7 +53,7 @@ namespace Files return traits_type::to_int_type(*gptr()); } - virtual pos_type seekoff(off_type offset, std::ios_base::seekdir whence, std::ios_base::openmode mode) + pos_type seekoff(off_type offset, std::ios_base::seekdir whence, std::ios_base::openmode mode) override { if((mode&std::ios_base::out) || !(mode&std::ios_base::in)) return traits_type::eof(); @@ -86,7 +86,7 @@ namespace Files return newPos; } - virtual pos_type seekpos(pos_type pos, std::ios_base::openmode mode) + pos_type seekpos(pos_type pos, std::ios_base::openmode mode) override { if((mode&std::ios_base::out) || !(mode&std::ios_base::in)) return traits_type::eof(); diff --git a/components/interpreter/controlopcodes.hpp b/components/interpreter/controlopcodes.hpp index caa7559890..fdf9291612 100644 --- a/components/interpreter/controlopcodes.hpp +++ b/components/interpreter/controlopcodes.hpp @@ -12,7 +12,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { runtime.setPC (-1); } @@ -22,7 +22,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; runtime.pop(); @@ -36,7 +36,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; runtime.pop(); @@ -50,7 +50,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime, unsigned int arg0) + void execute (Runtime& runtime, unsigned int arg0) override { if (arg0==0) throw std::logic_error ("infinite loop"); @@ -63,7 +63,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime, unsigned int arg0) + void execute (Runtime& runtime, unsigned int arg0) override { if (arg0==0) throw std::logic_error ("infinite loop"); diff --git a/components/interpreter/genericopcodes.hpp b/components/interpreter/genericopcodes.hpp index 44ef3fc6bf..ca08027aeb 100644 --- a/components/interpreter/genericopcodes.hpp +++ b/components/interpreter/genericopcodes.hpp @@ -10,7 +10,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime, unsigned int arg0) + void execute (Runtime& runtime, unsigned int arg0) override { runtime.push (static_cast (arg0)); } @@ -20,7 +20,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; Type_Float floatValue = static_cast (data); @@ -32,7 +32,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[0].mFloat; Type_Integer integerValue = static_cast (data); @@ -44,7 +44,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; data = -data; @@ -56,7 +56,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[0].mFloat; data = -data; @@ -68,7 +68,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[1].mInteger; Type_Float floatValue = static_cast (data); @@ -80,7 +80,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[1].mFloat; Type_Integer integerValue = static_cast (data); diff --git a/components/interpreter/localopcodes.hpp b/components/interpreter/localopcodes.hpp index 7844a9ea73..0227327b3a 100644 --- a/components/interpreter/localopcodes.hpp +++ b/components/interpreter/localopcodes.hpp @@ -11,7 +11,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; int index = runtime[1].mInteger; @@ -27,7 +27,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; int index = runtime[1].mInteger; @@ -43,7 +43,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[0].mFloat; int index = runtime[1].mInteger; @@ -59,7 +59,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer intValue = runtime.getIntegerLiteral (runtime[0].mInteger); runtime[0].mInteger = intValue; @@ -70,7 +70,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float floatValue = runtime.getFloatLiteral (runtime[0].mInteger); runtime[0].mFloat = floatValue; @@ -81,7 +81,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; int value = runtime.getContext().getLocalShort (index); @@ -93,7 +93,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; int value = runtime.getContext().getLocalLong (index); @@ -105,7 +105,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; float value = runtime.getContext().getLocalFloat (index); @@ -117,7 +117,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; int index = runtime[1].mInteger; @@ -135,7 +135,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; int index = runtime[1].mInteger; @@ -153,7 +153,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[0].mFloat; int index = runtime[1].mInteger; @@ -171,7 +171,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; std::string name = runtime.getStringLiteral (index); @@ -184,7 +184,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; std::string name = runtime.getStringLiteral (index); @@ -197,7 +197,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int index = runtime[0].mInteger; std::string name = runtime.getStringLiteral (index); @@ -214,7 +214,7 @@ namespace Interpreter OpStoreMemberShort (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; Type_Integer index = runtime[1].mInteger; @@ -238,7 +238,7 @@ namespace Interpreter OpStoreMemberLong (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer data = runtime[0].mInteger; Type_Integer index = runtime[1].mInteger; @@ -262,7 +262,7 @@ namespace Interpreter OpStoreMemberFloat (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float data = runtime[0].mFloat; Type_Integer index = runtime[1].mInteger; @@ -286,7 +286,7 @@ namespace Interpreter OpFetchMemberShort (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer index = runtime[0].mInteger; std::string id = runtime.getStringLiteral (index); @@ -307,7 +307,7 @@ namespace Interpreter OpFetchMemberLong (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer index = runtime[0].mInteger; std::string id = runtime.getStringLiteral (index); @@ -328,7 +328,7 @@ namespace Interpreter OpFetchMemberFloat (bool global) : mGlobal (global) {} - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Integer index = runtime[0].mInteger; std::string id = runtime.getStringLiteral (index); diff --git a/components/interpreter/mathopcodes.hpp b/components/interpreter/mathopcodes.hpp index 14d5d98df8..42cb486b9c 100644 --- a/components/interpreter/mathopcodes.hpp +++ b/components/interpreter/mathopcodes.hpp @@ -14,7 +14,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { T result = getData (runtime[1]) + getData (runtime[0]); @@ -29,7 +29,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { T result = getData (runtime[1]) - getData (runtime[0]); @@ -44,7 +44,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { T result = getData (runtime[1]) * getData (runtime[0]); @@ -59,7 +59,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { T left = getData (runtime[0]); @@ -78,7 +78,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { Type_Float value = runtime[0].mFloat; @@ -97,7 +97,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { int result = C() (getData (runtime[1]), getData (runtime[0])); diff --git a/components/interpreter/miscopcodes.hpp b/components/interpreter/miscopcodes.hpp index 07bd84ec9b..5a9311346a 100644 --- a/components/interpreter/miscopcodes.hpp +++ b/components/interpreter/miscopcodes.hpp @@ -22,7 +22,7 @@ namespace Interpreter Runtime& mRuntime; protected: - virtual void visitedPlaceholder(Placeholder placeholder, char padding, int width, int precision, Notation notation) + void visitedPlaceholder(Placeholder placeholder, char padding, int width, int precision, Notation notation) override { std::ostringstream out; out.fill(padding); @@ -86,7 +86,7 @@ namespace Interpreter } } - virtual void visitedCharacter(char c) + void visitedCharacter(char c) override { mFormattedMessage += c; } @@ -97,7 +97,7 @@ namespace Interpreter { } - virtual void process(const std::string& message) + void process(const std::string& message) override { mFormattedMessage.clear(); MessageFormatParser::process(message); @@ -123,7 +123,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime, unsigned int arg0) + void execute (Runtime& runtime, unsigned int arg0) override { // message int index = runtime[0].mInteger; @@ -153,7 +153,7 @@ namespace Interpreter { public: - virtual void execute (Runtime& runtime) + void execute (Runtime& runtime) override { // message int index = runtime[0].mInteger; diff --git a/components/myguiplatform/myguidatamanager.hpp b/components/myguiplatform/myguidatamanager.hpp index 5002f0fb75..a97c6ad2e0 100644 --- a/components/myguiplatform/myguidatamanager.hpp +++ b/components/myguiplatform/myguidatamanager.hpp @@ -18,28 +18,28 @@ public: /** Get data stream from specified resource name. @param _name Resource name (usually file name). */ - virtual MyGUI::IDataStream* getData(const std::string& _name); + MyGUI::IDataStream* getData(const std::string& _name) override; /** Free data stream. @param _data Data stream. */ - virtual void freeData(MyGUI::IDataStream* _data); + void freeData(MyGUI::IDataStream* _data) override; /** Is data with specified name exist. @param _name Resource name. */ - virtual bool isDataExist(const std::string& _name); + bool isDataExist(const std::string& _name) override; /** Get all data names with names that matches pattern. @param _pattern Pattern to match (for example "*.layout"). */ - virtual const MyGUI::VectorString& getDataListNames(const std::string& _pattern); + const MyGUI::VectorString& getDataListNames(const std::string& _pattern) override; /** Get full path to data. @param _name Resource name. @return Return full path to specified data. */ - virtual const std::string& getDataPath(const std::string& _name); + const std::string& getDataPath(const std::string& _name) override; private: std::string mResourcePath; diff --git a/components/myguiplatform/myguiloglistener.hpp b/components/myguiplatform/myguiloglistener.hpp index 70dfc4ecfd..4bab20ac97 100644 --- a/components/myguiplatform/myguiloglistener.hpp +++ b/components/myguiplatform/myguiloglistener.hpp @@ -24,11 +24,11 @@ namespace osgMyGUI ~CustomLogListener() {} - virtual void open(); - virtual void close(); - virtual void flush(); + void open() override; + void close() override; + void flush() override; - virtual void log(const std::string& _section, MyGUI::LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line); + void log(const std::string& _section, MyGUI::LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line) override; const std::string& getFileName() const { return mFileName; } diff --git a/components/myguiplatform/myguirendermanager.cpp b/components/myguiplatform/myguirendermanager.cpp index 33cc31e2e8..bba7df702b 100644 --- a/components/myguiplatform/myguirendermanager.cpp +++ b/components/myguiplatform/myguirendermanager.cpp @@ -59,7 +59,7 @@ public: mRenderManager = renderManager; } - virtual void update(osg::NodeVisitor*, osg::Drawable*) + void update(osg::NodeVisitor*, osg::Drawable*) override { if (mRenderManager) mRenderManager->update(); @@ -83,7 +83,7 @@ public: mRenderManager = renderManager; } - virtual bool cull(osg::NodeVisitor*, osg::Drawable*, osg::State*) const + bool cull(osg::NodeVisitor*, osg::Drawable*, osg::State*) const override { if (!mRenderManager) return false; @@ -97,7 +97,7 @@ public: }; // Stage 2: execute the draw calls. Run during the Draw traversal. May run in parallel with the update traversal of the next frame. - virtual void drawImplementation(osg::RenderInfo &renderInfo) const + void drawImplementation(osg::RenderInfo &renderInfo) const override { osg::State *state = renderInfo.getState(); @@ -262,11 +262,11 @@ public: osg::Array* getVertexArray(); osg::VertexBufferObject* getVertexBuffer(); - virtual void setVertexCount(size_t count); - virtual size_t getVertexCount(); + void setVertexCount(size_t count) override; + size_t getVertexCount() override; - virtual MyGUI::Vertex *lock(); - virtual void unlock(); + MyGUI::Vertex *lock() override; + void unlock() override; }; diff --git a/components/myguiplatform/myguirendermanager.hpp b/components/myguiplatform/myguirendermanager.hpp index 8c9e3e30f3..1e82bc0dfd 100644 --- a/components/myguiplatform/myguirendermanager.hpp +++ b/components/myguiplatform/myguirendermanager.hpp @@ -67,42 +67,42 @@ public: { return static_cast(MyGUI::RenderManager::getInstancePtr()); } /** @see RenderManager::getViewSize */ - virtual const MyGUI::IntSize& getViewSize() const { return mViewSize; } + const MyGUI::IntSize& getViewSize() const override { return mViewSize; } /** @see RenderManager::getVertexFormat */ - virtual MyGUI::VertexColourType getVertexFormat() { return mVertexFormat; } + MyGUI::VertexColourType getVertexFormat() override { return mVertexFormat; } /** @see RenderManager::isFormatSupported */ - virtual bool isFormatSupported(MyGUI::PixelFormat format, MyGUI::TextureUsage usage); + bool isFormatSupported(MyGUI::PixelFormat format, MyGUI::TextureUsage usage) override; /** @see RenderManager::createVertexBuffer */ - virtual MyGUI::IVertexBuffer* createVertexBuffer(); + MyGUI::IVertexBuffer* createVertexBuffer() override; /** @see RenderManager::destroyVertexBuffer */ - virtual void destroyVertexBuffer(MyGUI::IVertexBuffer *buffer); + void destroyVertexBuffer(MyGUI::IVertexBuffer *buffer) override; /** @see RenderManager::createTexture */ - virtual MyGUI::ITexture* createTexture(const std::string &name); + MyGUI::ITexture* createTexture(const std::string &name) override; /** @see RenderManager::destroyTexture */ - virtual void destroyTexture(MyGUI::ITexture* _texture); + void destroyTexture(MyGUI::ITexture* _texture) override; /** @see RenderManager::getTexture */ - virtual MyGUI::ITexture* getTexture(const std::string &name); + MyGUI::ITexture* getTexture(const std::string &name) override; // Called by the update traversal void update(); // Called by the cull traversal /** @see IRenderTarget::begin */ - virtual void begin(); + void begin() override; /** @see IRenderTarget::end */ - virtual void end(); + void end() override; /** @see IRenderTarget::doRender */ - virtual void doRender(MyGUI::IVertexBuffer *buffer, MyGUI::ITexture *texture, size_t count); + void doRender(MyGUI::IVertexBuffer *buffer, MyGUI::ITexture *texture, size_t count) override; /** specify a StateSet to inject for rendering. The StateSet will be used by future doRender calls until you reset it to nullptr again. */ void setInjectState(osg::StateSet* stateSet); /** @see IRenderTarget::getInfo */ - virtual const MyGUI::RenderTargetInfo& getInfo() { return mInfo; } + const MyGUI::RenderTargetInfo& getInfo() override { return mInfo; } bool checkTexture(MyGUI::ITexture* _texture); diff --git a/components/myguiplatform/myguitexture.hpp b/components/myguiplatform/myguitexture.hpp index 48f2ed2650..6baeb74591 100644 --- a/components/myguiplatform/myguitexture.hpp +++ b/components/myguiplatform/myguitexture.hpp @@ -37,26 +37,26 @@ namespace osgMyGUI OSGTexture(osg::Texture2D* texture); virtual ~OSGTexture(); - virtual const std::string& getName() const { return mName; } + const std::string& getName() const override { return mName; } - virtual void createManual(int width, int height, MyGUI::TextureUsage usage, MyGUI::PixelFormat format); - virtual void loadFromFile(const std::string &fname); - virtual void saveToFile(const std::string &fname); + void createManual(int width, int height, MyGUI::TextureUsage usage, MyGUI::PixelFormat format) override; + void loadFromFile(const std::string &fname) override; + void saveToFile(const std::string &fname) override; - virtual void destroy(); + void destroy() override; - virtual void* lock(MyGUI::TextureUsage access); - virtual void unlock(); - virtual bool isLocked(); + void* lock(MyGUI::TextureUsage access) override; + void unlock() override; + bool isLocked() override; - virtual int getWidth(); - virtual int getHeight(); + int getWidth() override; + int getHeight() override; - virtual MyGUI::PixelFormat getFormat() { return mFormat; } - virtual MyGUI::TextureUsage getUsage() { return mUsage; } - virtual size_t getNumElemBytes() { return mNumElemBytes; } + MyGUI::PixelFormat getFormat() override { return mFormat; } + MyGUI::TextureUsage getUsage() override { return mUsage; } + size_t getNumElemBytes() override { return mNumElemBytes; } - virtual MyGUI::IRenderTarget *getRenderTarget(); + MyGUI::IRenderTarget *getRenderTarget() override; /*internal:*/ osg::Texture2D *getTexture() const { return mTexture.get(); } diff --git a/components/myguiplatform/scalinglayer.cpp b/components/myguiplatform/scalinglayer.cpp index ee9de349ed..07a5161b2d 100644 --- a/components/myguiplatform/scalinglayer.cpp +++ b/components/myguiplatform/scalinglayer.cpp @@ -22,22 +22,22 @@ namespace osgMyGUI { } - virtual void begin() + void begin() override { mTarget->begin(); } - virtual void end() + void end() override { mTarget->end(); } - virtual void doRender(MyGUI::IVertexBuffer* _buffer, MyGUI::ITexture* _texture, size_t _count) + void doRender(MyGUI::IVertexBuffer* _buffer, MyGUI::ITexture* _texture, size_t _count) override { mTarget->doRender(_buffer, _texture, _count); } - virtual const MyGUI::RenderTargetInfo& getInfo() + const MyGUI::RenderTargetInfo& getInfo() override { mInfo = mTarget->getInfo(); mInfo.hOffset = mHOffset; diff --git a/components/nif/base.hpp b/components/nif/base.hpp index 0d42131e54..711272abb0 100644 --- a/components/nif/base.hpp +++ b/components/nif/base.hpp @@ -17,7 +17,7 @@ public: std::string name; ExtraPtr next; // Next extra data record in the list - void read(NIFStream *nif) + void read(NIFStream *nif) override { if (nif->getVersion() >= NIFStream::generateVersion(10,0,1,0)) name = nif->getString(); @@ -28,7 +28,7 @@ public: } } - void post(NIFFile *nif) { next.post(nif); } + void post(NIFFile *nif) override { next.post(nif); } }; class Controller : public Record @@ -40,8 +40,8 @@ public: float timeStart, timeStop; NamedPtr target; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; /// Has name, extra-data and controller @@ -53,7 +53,7 @@ public: ExtraList extralist; ControllerPtr controller; - void read(NIFStream *nif) + void read(NIFStream *nif) override { name = nif->getString(); if (nif->getVersion() < NIFStream::generateVersion(10,0,1,0)) @@ -63,7 +63,7 @@ public: controller.read(nif); } - void post(NIFFile *nif) + void post(NIFFile *nif) override { extra.post(nif); extralist.post(nif); diff --git a/components/nif/controlled.hpp b/components/nif/controlled.hpp index 8396eae04c..57d538f839 100644 --- a/components/nif/controlled.hpp +++ b/components/nif/controlled.hpp @@ -62,8 +62,8 @@ public: */ unsigned int alpha; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; struct NiParticleModifier : public Record @@ -71,8 +71,8 @@ struct NiParticleModifier : public Record NiParticleModifierPtr next; ControllerPtr controller; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiParticleGrowFade : public NiParticleModifier @@ -81,7 +81,7 @@ public: float growTime; float fadeTime; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiParticleColorModifier : public NiParticleModifier @@ -89,8 +89,8 @@ class NiParticleColorModifier : public NiParticleModifier public: NiColorDataPtr data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiGravity : public NiParticleModifier @@ -105,20 +105,20 @@ public: osg::Vec3f mPosition; osg::Vec3f mDirection; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiParticleCollider : public NiParticleModifier { float mBounceFactor; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; // NiPinaColada class NiPlanarCollider : public NiParticleCollider { public: - void read(NIFStream *nif); + void read(NIFStream *nif) override; osg::Vec3f mPlaneNormal; float mPlaneDistance; @@ -130,13 +130,13 @@ public: float mRadius; osg::Vec3f mCenter; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiParticleRotation : public NiParticleModifier { public: - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; diff --git a/components/nif/controller.hpp b/components/nif/controller.hpp index a527a4400a..54cf9bf8f4 100644 --- a/components/nif/controller.hpp +++ b/components/nif/controller.hpp @@ -75,8 +75,8 @@ public: NiParticleModifierPtr affectors; NiParticleModifierPtr colliders; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; using NiBSPArrayController = NiParticleSystemController; @@ -86,8 +86,8 @@ public: NiPosDataPtr data; unsigned int targetColor; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiPathController : public Controller @@ -110,8 +110,8 @@ public: float maxBankAngle, smoothing; short followAxis; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiLookAtController : public Controller @@ -120,8 +120,8 @@ public: NodePtr target; unsigned short lookAtFlags{0}; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiUVController : public Controller @@ -130,8 +130,8 @@ public: NiUVDataPtr data; unsigned int uvSet; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiKeyframeController : public Controller @@ -139,16 +139,16 @@ class NiKeyframeController : public Controller public: NiKeyframeDataPtr data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; struct NiFloatInterpController : public Controller { NiFloatDataPtr data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiAlphaController : public NiFloatInterpController { }; @@ -159,8 +159,8 @@ class NiGeomMorpherController : public Controller public: NiMorphDataPtr data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiVisController : public Controller @@ -168,8 +168,8 @@ class NiVisController : public Controller public: NiVisDataPtr data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiFlipController : public Controller @@ -179,8 +179,8 @@ public: float mDelta; // Time between two flips. delta = (start_time - stop_time) / num_sources NiSourceTextureList mSources; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; } // Namespace diff --git a/components/nif/data.hpp b/components/nif/data.hpp index 58d6cf755d..0ba5446459 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -41,7 +41,7 @@ public: osg::Vec3f center; float radius; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiTriShapeData : public NiGeometryData @@ -50,7 +50,7 @@ public: // Triangles, three vertex indices per triangle std::vector triangles; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiTriStripsData : public NiGeometryData @@ -59,7 +59,7 @@ public: // Triangle strips, series of vertex indices. std::vector> strips; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiLinesData : public NiGeometryData @@ -67,7 +67,7 @@ struct NiLinesData : public NiGeometryData // Lines, series of indices that correspond to connected vertices. std::vector lines; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiAutoNormalParticlesData : public NiGeometryData @@ -81,13 +81,13 @@ public: std::vector rotations; std::vector rotationAxes; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiRotatingParticlesData : public NiAutoNormalParticlesData { public: - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiPosData : public Record @@ -95,7 +95,7 @@ class NiPosData : public Record public: Vector3KeyMapPtr mKeyList; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiUVData : public Record @@ -103,7 +103,7 @@ class NiUVData : public Record public: FloatKeyMapPtr mKeyList[4]; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiFloatData : public Record @@ -111,7 +111,7 @@ class NiFloatData : public Record public: FloatKeyMapPtr mKeyList; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiPixelData : public Record @@ -146,8 +146,8 @@ public: std::vector data; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiColorData : public Record @@ -155,7 +155,7 @@ class NiColorData : public Record public: Vector4KeyMapPtr mKeyMap; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiVisData : public Record @@ -167,7 +167,7 @@ public: }; std::vector mVis; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiSkinInstance : public Record @@ -177,8 +177,8 @@ public: NodePtr root; NodeList bones; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiSkinData : public Record @@ -201,7 +201,7 @@ public: Transformation trafo; std::vector bones; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiMorphData : public Record @@ -212,7 +212,7 @@ struct NiMorphData : public Record }; std::vector mMorphs; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; @@ -228,7 +228,7 @@ struct NiKeyframeData : public Record Vector3KeyMapPtr mTranslations; FloatKeyMapPtr mScales; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiPalette : public Record @@ -237,7 +237,7 @@ public: // 32-bit RGBA colors that correspond to 8-bit indices std::vector colors; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; } // Namespace diff --git a/components/nif/effect.hpp b/components/nif/effect.hpp index 818df90a29..32eb3d80d8 100644 --- a/components/nif/effect.hpp +++ b/components/nif/effect.hpp @@ -31,7 +31,7 @@ namespace Nif struct NiDynamicEffect : public Node { - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); if (nif->getVersion() >= nif->generateVersion(10,1,0,106) @@ -51,7 +51,7 @@ struct NiLight : NiDynamicEffect osg::Vec3f diffuse; osg::Vec3f specular; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiPointLight : public NiLight @@ -60,14 +60,14 @@ struct NiPointLight : public NiLight float linearAttenuation; float quadraticAttenuation; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiSpotLight : public NiPointLight { float cutoff; float exponent; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiTextureEffect : NiDynamicEffect @@ -94,8 +94,8 @@ struct NiTextureEffect : NiDynamicEffect }; CoordGenType coordGenType; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; } // Namespace diff --git a/components/nif/extra.hpp b/components/nif/extra.hpp index 0e8cc16bf5..3be627004c 100644 --- a/components/nif/extra.hpp +++ b/components/nif/extra.hpp @@ -32,7 +32,7 @@ namespace Nif class NiVertWeightsExtraData : public Extra { public: - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiTextKeyExtraData : public Extra @@ -45,7 +45,7 @@ public: }; std::vector list; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; class NiStringExtraData : public Extra @@ -57,56 +57,56 @@ public: */ std::string string; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiIntegerExtraData : public Extra { unsigned int data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiIntegersExtraData : public Extra { std::vector data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiBinaryExtraData : public Extra { std::vector data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiBooleanExtraData : public Extra { bool data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiVectorExtraData : public Extra { osg::Vec4f data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiFloatExtraData : public Extra { float data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; struct NiFloatsExtraData : public Extra { std::vector data; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; } // Namespace diff --git a/components/nif/node.hpp b/components/nif/node.hpp index 4c57b2e811..72adfe06cd 100644 --- a/components/nif/node.hpp +++ b/components/nif/node.hpp @@ -35,7 +35,7 @@ public: Matrix3 boundRot; osg::Vec3f boundXYZ; // Box size - void read(NIFStream *nif) + void read(NIFStream *nif) override { Named::read(nif); @@ -64,7 +64,7 @@ public: isBone = false; } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Named::post(nif); props.post(nif); @@ -104,7 +104,7 @@ struct NiNode : Node ControllerFlag_Active = 0x8 }; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); children.read(nif); @@ -120,7 +120,7 @@ struct NiNode : Node } } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); children.post(nif); @@ -183,7 +183,7 @@ struct NiTriShape : NiGeometry NiTriShapeDataPtr data; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); data.read(nif); @@ -191,7 +191,7 @@ struct NiTriShape : NiGeometry materialData.read(nif); } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); data.post(nif); @@ -205,7 +205,7 @@ struct NiTriStrips : NiGeometry { NiTriStripsDataPtr data; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); data.read(nif); @@ -213,7 +213,7 @@ struct NiTriStrips : NiGeometry materialData.read(nif); } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); data.post(nif); @@ -227,14 +227,14 @@ struct NiLines : NiGeometry { NiLinesDataPtr data; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); data.read(nif); skin.read(nif); } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); data.post(nif); @@ -284,7 +284,7 @@ struct NiCamera : Node }; Camera cam; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); @@ -301,14 +301,14 @@ struct NiAutoNormalParticles : Node { NiAutoNormalParticlesDataPtr data; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); data.read(nif); nif->getInt(); // -1 } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); data.post(nif); @@ -319,14 +319,14 @@ struct NiRotatingParticles : Node { NiRotatingParticlesDataPtr data; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Node::read(nif); data.read(nif); nif->getInt(); // -1 } - void post(NIFFile *nif) + void post(NIFFile *nif) override { Node::post(nif); data.post(nif); @@ -339,7 +339,7 @@ struct NiSwitchNode : public NiNode unsigned int switchFlags{0}; unsigned int initialIndex; - void read(NIFStream *nif) + void read(NIFStream *nif) override { NiNode::read(nif); if (nif->getVersion() >= NIFStream::generateVersion(10,1,0,0)) @@ -359,7 +359,7 @@ struct NiLODNode : public NiSwitchNode }; std::vector lodLevels; - void read(NIFStream *nif) + void read(NIFStream *nif) override { NiSwitchNode::read(nif); if (nif->getVersion() >= NIFFile::NIFVersion::VER_MW && nif->getVersion() <= NIFStream::generateVersion(10,0,1,0)) diff --git a/components/nif/property.hpp b/components/nif/property.hpp index aeef0c027a..c821b7c37e 100644 --- a/components/nif/property.hpp +++ b/components/nif/property.hpp @@ -92,8 +92,8 @@ public: osg::Vec2f envMapLumaBias; osg::Vec4f bumpMapMatrix; - void read(NIFStream *nif); - void post(NIFFile *nif); + void read(NIFStream *nif) override; + void post(NIFFile *nif) override; }; class NiFogProperty : public Property @@ -103,14 +103,14 @@ public: float mFogDepth; osg::Vec3f mColour; - void read(NIFStream *nif); + void read(NIFStream *nif) override; }; // These contain no other data than the 'flags' field struct NiShadeProperty : public Property { unsigned short flags{0u}; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Property::read(nif); if (nif->getBethVersion() <= NIFFile::BethVersion::BETHVER_FO3) @@ -121,7 +121,7 @@ struct NiShadeProperty : public Property struct NiDitherProperty : public Property { unsigned short flags; - void read(NIFStream* nif) + void read(NIFStream* nif) override { Property::read(nif); flags = nif->getUShort(); @@ -132,7 +132,7 @@ struct NiZBufferProperty : public Property { unsigned short flags; unsigned int testFunction; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Property::read(nif); flags = nif->getUShort(); @@ -145,7 +145,7 @@ struct NiZBufferProperty : public Property struct NiSpecularProperty : public Property { unsigned short flags; - void read(NIFStream* nif) + void read(NIFStream* nif) override { Property::read(nif); flags = nif->getUShort(); @@ -155,7 +155,7 @@ struct NiSpecularProperty : public Property struct NiWireframeProperty : public Property { unsigned short flags; - void read(NIFStream* nif) + void read(NIFStream* nif) override { Property::read(nif); flags = nif->getUShort(); @@ -169,7 +169,7 @@ struct StructPropT : Property T data; unsigned short flags; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Property::read(nif); flags = nif->getUShort(); @@ -301,7 +301,7 @@ struct NiStencilProperty : public Property S_StencilProperty data; unsigned short flags{0u}; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Property::read(nif); if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD) @@ -315,7 +315,7 @@ struct NiMaterialProperty : public Property S_MaterialProperty data; unsigned short flags{0u}; - void read(NIFStream *nif) + void read(NIFStream *nif) override { Property::read(nif); if (nif->getVersion() >= NIFStream::generateVersion(3,0,0,0) diff --git a/components/nifosg/controller.hpp b/components/nifosg/controller.hpp index a93dd28ebe..c087e635f8 100644 --- a/components/nifosg/controller.hpp +++ b/components/nifosg/controller.hpp @@ -179,9 +179,9 @@ namespace NifOsg public: ControllerFunction(const Nif::Controller *ctrl); - float calculate(float value) const; + float calculate(float value) const override; - virtual float getMaximum() const; + float getMaximum() const override; }; /// Must be set on a SceneUtil::MorphGeometry. @@ -194,7 +194,7 @@ namespace NifOsg META_Object(NifOsg, GeomMorpherController) - virtual void update(osg::NodeVisitor* nv, osg::Drawable* drawable); + void update(osg::NodeVisitor* nv, osg::Drawable* drawable) override; private: std::vector mKeyFrames; @@ -211,7 +211,7 @@ namespace NifOsg virtual osg::Vec3f getTranslation(float time) const; - virtual void operator() (osg::Node*, osg::NodeVisitor*); + void operator() (osg::Node*, osg::NodeVisitor*) override; private: QuaternionInterpolator mRotations; @@ -235,8 +235,8 @@ namespace NifOsg META_Object(NifOsg,UVController) - virtual void setDefaults(osg::StateSet* stateset); - virtual void apply(osg::StateSet *stateset, osg::NodeVisitor *nv); + void setDefaults(osg::StateSet* stateset) override; + void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) override; private: FloatInterpolator mUTrans; @@ -261,7 +261,7 @@ namespace NifOsg META_Object(NifOsg, VisController) - virtual void operator() (osg::Node* node, osg::NodeVisitor* nv); + void operator() (osg::Node* node, osg::NodeVisitor* nv) override; }; class RollController : public osg::NodeCallback, public SceneUtil::Controller @@ -275,7 +275,7 @@ namespace NifOsg RollController() = default; RollController(const RollController& copy, const osg::CopyOp& copyop); - virtual void operator() (osg::Node* node, osg::NodeVisitor* nv); + void operator() (osg::Node* node, osg::NodeVisitor* nv) override; META_Object(NifOsg, RollController) }; @@ -290,9 +290,9 @@ namespace NifOsg AlphaController(); AlphaController(const AlphaController& copy, const osg::CopyOp& copyop); - virtual void setDefaults(osg::StateSet* stateset); + void setDefaults(osg::StateSet* stateset) override; - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* nv); + void apply(osg::StateSet* stateset, osg::NodeVisitor* nv) override; META_Object(NifOsg, AlphaController) }; @@ -313,9 +313,9 @@ namespace NifOsg META_Object(NifOsg, MaterialColorController) - virtual void setDefaults(osg::StateSet* stateset); + void setDefaults(osg::StateSet* stateset) override; - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* nv); + void apply(osg::StateSet* stateset, osg::NodeVisitor* nv) override; private: Vec3Interpolator mData; @@ -340,7 +340,7 @@ namespace NifOsg std::vector >& getTextures() { return mTextures; } - virtual void apply(osg::StateSet *stateset, osg::NodeVisitor *nv); + void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) override; }; class ParticleSystemController : public osg::NodeCallback, public SceneUtil::Controller @@ -352,7 +352,7 @@ namespace NifOsg META_Object(NifOsg, ParticleSystemController) - virtual void operator() (osg::Node* node, osg::NodeVisitor* nv); + void operator() (osg::Node* node, osg::NodeVisitor* nv) override; private: float mEmitStart; @@ -368,7 +368,7 @@ namespace NifOsg META_Object(NifOsg, PathController) - virtual void operator() (osg::Node*, osg::NodeVisitor*); + void operator() (osg::Node*, osg::NodeVisitor*) override; private: Vec3Interpolator mPath; diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 61a276dc15..65f62346da 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -102,7 +102,7 @@ namespace META_Object(NifOsg, BillboardCallback) - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgUtil::CullVisitor* cv = static_cast(nv); diff --git a/components/nifosg/particle.hpp b/components/nifosg/particle.hpp index d71cbb9f57..724a8a721d 100644 --- a/components/nifosg/particle.hpp +++ b/components/nifosg/particle.hpp @@ -32,11 +32,11 @@ namespace NifOsg META_Object(NifOsg, ParticleSystem) - virtual osgParticle::Particle* createParticle(const osgParticle::Particle *ptemplate); + osgParticle::Particle* createParticle(const osgParticle::Particle *ptemplate) override; void setQuota(int quota); - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; + void drawImplementation(osg::RenderInfo& renderInfo) const override; private: int mQuota; @@ -70,7 +70,7 @@ namespace NifOsg META_Object(NifOsg, InverseWorldMatrix) - void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; }; class ParticleShooter : public osgParticle::Shooter @@ -85,7 +85,7 @@ namespace NifOsg META_Object(NifOsg, ParticleShooter) - virtual void shoot(osgParticle::Particle* particle) const; + void shoot(osgParticle::Particle* particle) const override; private: float mMinSpeed; @@ -107,8 +107,8 @@ namespace NifOsg META_Object(NifOsg, PlanarCollider) - virtual void beginOperate(osgParticle::Program* program); - virtual void operate(osgParticle::Particle* particle, double dt); + void beginOperate(osgParticle::Program* program) override; + void operate(osgParticle::Particle* particle, double dt) override; private: float mBounceFactor; @@ -125,8 +125,8 @@ namespace NifOsg META_Object(NifOsg, SphericalCollider) - virtual void beginOperate(osgParticle::Program* program); - virtual void operate(osgParticle::Particle* particle, double dt); + void beginOperate(osgParticle::Program* program) override; + void operate(osgParticle::Particle* particle, double dt) override; private: float mBounceFactor; osg::BoundingSphere mSphere; @@ -144,8 +144,8 @@ namespace NifOsg META_Object(NifOsg, GrowFadeAffector) - virtual void beginOperate(osgParticle::Program* program); - virtual void operate(osgParticle::Particle* particle, double dt); + void beginOperate(osgParticle::Program* program) override; + void operate(osgParticle::Particle* particle, double dt) override; private: float mGrowTime; @@ -165,7 +165,7 @@ namespace NifOsg META_Object(NifOsg, ParticleColorAffector) - virtual void operate(osgParticle::Particle* particle, double dt); + void operate(osgParticle::Particle* particle, double dt) override; private: Vec4Interpolator mData; @@ -182,8 +182,8 @@ namespace NifOsg META_Object(NifOsg, GravityAffector) - virtual void operate(osgParticle::Particle* particle, double dt); - virtual void beginOperate(osgParticle::Program *); + void operate(osgParticle::Particle* particle, double dt) override; + void beginOperate(osgParticle::Program *) override ; private: float mForce; @@ -206,12 +206,12 @@ namespace NifOsg public: FindGroupByRecIndex(int recIndex); - virtual void apply(osg::Node &node); + void apply(osg::Node &node) override; // Technically not required as the default implementation would trickle down to apply(Node&) anyway, // but we'll shortcut instead to avoid the chain of virtual function calls - virtual void apply(osg::MatrixTransform& node); - virtual void apply(osg::Geometry& node); + void apply(osg::MatrixTransform& node) override; + void apply(osg::Geometry& node) override; void applyNode(osg::Node& searchNode); @@ -231,7 +231,7 @@ namespace NifOsg META_Object(NifOsg, Emitter) - virtual void emitParticles(double dt); + void emitParticles(double dt) override; void setShooter(osgParticle::Shooter* shooter); void setPlacer(osgParticle::Placer* placer); diff --git a/components/resource/bulletshapemanager.cpp b/components/resource/bulletshapemanager.cpp index 4193cd5b42..bcadf51c4e 100644 --- a/components/resource/bulletshapemanager.cpp +++ b/components/resource/bulletshapemanager.cpp @@ -68,7 +68,7 @@ public: } - virtual void apply(osg::Drawable &drawable) + void apply(osg::Drawable &drawable) override { if (!mTriangleMesh) mTriangleMesh.reset(new btTriangleMesh); diff --git a/components/resource/bulletshapemanager.hpp b/components/resource/bulletshapemanager.hpp index 8ae2b531f2..7b1289e451 100644 --- a/components/resource/bulletshapemanager.hpp +++ b/components/resource/bulletshapemanager.hpp @@ -40,11 +40,11 @@ namespace Resource osg::ref_ptr getInstance(const std::string& name); /// @see ResourceManager::updateCache - virtual void updateCache(double referenceTime); + void updateCache(double referenceTime) override; - virtual void clearCache(); + void clearCache() override; - void reportStats(unsigned int frameNumber, osg::Stats *stats) const; + void reportStats(unsigned int frameNumber, osg::Stats *stats) const override; private: osg::ref_ptr createInstance(const std::string& name); diff --git a/components/resource/imagemanager.hpp b/components/resource/imagemanager.hpp index 8eea4a70b1..64954af54b 100644 --- a/components/resource/imagemanager.hpp +++ b/components/resource/imagemanager.hpp @@ -32,7 +32,7 @@ namespace Resource osg::Image* getWarningImage(); - void reportStats(unsigned int frameNumber, osg::Stats* stats) const; + void reportStats(unsigned int frameNumber, osg::Stats* stats) const override; private: osg::ref_ptr mWarningImage; diff --git a/components/resource/keyframemanager.hpp b/components/resource/keyframemanager.hpp index 3496342faa..fe1c4014e0 100644 --- a/components/resource/keyframemanager.hpp +++ b/components/resource/keyframemanager.hpp @@ -23,7 +23,7 @@ namespace Resource /// @note Throws an exception if the resource is not found. osg::ref_ptr get(const std::string& name); - void reportStats(unsigned int frameNumber, osg::Stats* stats) const; + void reportStats(unsigned int frameNumber, osg::Stats* stats) const override; }; } diff --git a/components/resource/niffilemanager.hpp b/components/resource/niffilemanager.hpp index c783bb7e07..d88aefd63e 100644 --- a/components/resource/niffilemanager.hpp +++ b/components/resource/niffilemanager.hpp @@ -23,7 +23,7 @@ namespace Resource /// to be done in advance by other managers accessing the NifFileManager. Nif::NIFFilePtr get(const std::string& name); - void reportStats(unsigned int frameNumber, osg::Stats *stats) const; + void reportStats(unsigned int frameNumber, osg::Stats *stats) const override; }; } diff --git a/components/resource/resourcemanager.hpp b/components/resource/resourcemanager.hpp index a5ae27c6a5..ccb065e3bf 100644 --- a/components/resource/resourcemanager.hpp +++ b/components/resource/resourcemanager.hpp @@ -48,23 +48,23 @@ namespace Resource virtual ~GenericResourceManager() {} /// Clear cache entries that have not been referenced for longer than expiryDelay. - virtual void updateCache(double referenceTime) + void updateCache(double referenceTime) override { mCache->updateTimeStampOfObjectsInCacheWithExternalReferences(referenceTime); mCache->removeExpiredObjectsInCache(referenceTime - mExpiryDelay); } /// Clear all cache entries. - virtual void clearCache() { mCache->clear(); } + void clearCache() override { mCache->clear(); } /// How long to keep objects in cache after no longer being referenced. - void setExpiryDelay (double expiryDelay) { mExpiryDelay = expiryDelay; } + void setExpiryDelay (double expiryDelay) override { mExpiryDelay = expiryDelay; } const VFS::Manager* getVFS() const { return mVFS; } - virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const {} + void reportStats(unsigned int frameNumber, osg::Stats* stats) const override {} - virtual void releaseGLObjects(osg::State* state) { mCache->releaseGLObjects(state); } + void releaseGLObjects(osg::State* state) override { mCache->releaseGLObjects(state); } protected: const VFS::Manager* mVFS; diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index ca6c7c895e..b87446351e 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -40,7 +40,7 @@ namespace class InitWorldSpaceParticlesCallback : public osg::NodeCallback { public: - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osgParticle::ParticleSystem* partsys = static_cast(node); @@ -91,7 +91,7 @@ namespace && partsys->getUserDataContainer()->getDescriptions()[0] == "worldspace"); } - void apply(osg::Drawable& drw) + void apply(osg::Drawable& drw) override { if (osgParticle::ParticleSystem* partsys = dynamic_cast(&drw)) { @@ -143,7 +143,7 @@ namespace Resource { } - virtual void visit(osg::Node& node, SceneUtil::Controller& ctrl) + void visit(osg::Node& node, SceneUtil::Controller& ctrl) override { if (NifOsg::FlipController* flipctrl = dynamic_cast(&ctrl)) { @@ -175,7 +175,7 @@ namespace Resource { } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { osg::StateSet* stateset = node.getStateSet(); if (stateset) @@ -316,7 +316,7 @@ namespace Resource { } - virtual osgDB::ReaderWriter::ReadResult readImage(const std::string& filename, const osgDB::Options* options) + osgDB::ReaderWriter::ReadResult readImage(const std::string& filename, const osgDB::Options* options) override { try { @@ -400,7 +400,7 @@ namespace Resource return it != reservedNames.end(); } - virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Drawable* node,unsigned int option) const + bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Drawable* node,unsigned int option) const override { if (option & SceneUtil::Optimizer::FLATTEN_STATIC_TRANSFORMS) { @@ -412,7 +412,7 @@ namespace Resource return (option & optimizer->getPermissibleOptimizationsForObject(node))!=0; } - virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const + bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const override { if (node->getNumDescriptions()>0) return false; if (node->getDataVariance() == osg::Object::DYNAMIC) return false; diff --git a/components/resource/stats.cpp b/components/resource/stats.cpp index 147970add3..942bd92d80 100644 --- a/components/resource/stats.cpp +++ b/components/resource/stats.cpp @@ -211,7 +211,7 @@ public: { } - virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const + void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const override { if (!mStats) return; diff --git a/components/resource/stats.hpp b/components/resource/stats.hpp index 8f04ee10db..9fa583cca4 100644 --- a/components/resource/stats.hpp +++ b/components/resource/stats.hpp @@ -29,7 +29,7 @@ namespace Resource void setKey(int key) { _key = key; } int getKey() const { return _key; } - bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa); + bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) override; void setWindowSize(int w, int h); @@ -39,7 +39,7 @@ namespace Resource void setUpScene(osgViewer::ViewerBase* viewer); /** Get the keyboard and mouse usage of this manipulator.*/ - virtual void getUsage(osg::ApplicationUsage& usage) const; + void getUsage(osg::ApplicationUsage& usage) const override; private: osg::ref_ptr _switch; diff --git a/components/sceneutil/attach.cpp b/components/sceneutil/attach.cpp index 2a6ec84e5b..597c7adf48 100644 --- a/components/sceneutil/attach.cpp +++ b/components/sceneutil/attach.cpp @@ -30,20 +30,20 @@ namespace SceneUtil mFilter2 = "tri " + mFilter; } - virtual void apply(osg::MatrixTransform& node) + void apply(osg::MatrixTransform& node) override { traverse(node); } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { traverse(node); } - virtual void apply(osg::Group& node) + void apply(osg::Group& node) override { traverse(node); } - virtual void apply(osg::Drawable& drawable) + void apply(osg::Drawable& drawable) override { if (!filterMatches(drawable.getName())) return; diff --git a/components/sceneutil/clone.hpp b/components/sceneutil/clone.hpp index 8c5fbd3510..1cf00c9e58 100644 --- a/components/sceneutil/clone.hpp +++ b/components/sceneutil/clone.hpp @@ -27,8 +27,8 @@ namespace SceneUtil virtual osgParticle::ParticleSystem* operator() (const osgParticle::ParticleSystem* partsys) const; virtual osgParticle::ParticleProcessor* operator() (const osgParticle::ParticleProcessor* processor) const; - virtual osg::Node* operator() (const osg::Node* node) const; - virtual osg::Drawable* operator() (const osg::Drawable* drawable) const; + osg::Node* operator() (const osg::Node* node) const override; + osg::Drawable* operator() (const osg::Drawable* drawable) const override; private: // maps new pointers to their old pointers diff --git a/components/sceneutil/controller.hpp b/components/sceneutil/controller.hpp index d02b65cf10..2656d654e1 100644 --- a/components/sceneutil/controller.hpp +++ b/components/sceneutil/controller.hpp @@ -18,7 +18,7 @@ namespace SceneUtil { public: FrameTimeSource(); - virtual float getValue(osg::NodeVisitor* nv); + float getValue(osg::NodeVisitor* nv) override; }; /// @note ControllerFunctions may be shared - you should not hold any state in it. That is why all its methods are declared const. @@ -63,12 +63,12 @@ namespace SceneUtil public: ControllerVisitor(); - virtual void apply(osg::Node& node); + void apply(osg::Node& node) override; // Technically not required as the default implementation would trickle down to apply(Node&) anyway, // but we'll shortcut instead to avoid the chain of virtual function calls - virtual void apply(osg::MatrixTransform& node); - virtual void apply(osg::Geometry& node); + void apply(osg::MatrixTransform& node) override; + void apply(osg::Geometry& node) override; void applyNode(osg::Node& node); @@ -83,7 +83,7 @@ namespace SceneUtil /// Assign the wanted ControllerSource. May be overridden in derived classes. /// By default assigns the ControllerSource passed to the constructor of this class if no ControllerSource is assigned to that controller yet. - virtual void visit(osg::Node& node, Controller& ctrl); + void visit(osg::Node& node, Controller& ctrl) override; private: std::shared_ptr mToAssign; @@ -95,7 +95,7 @@ namespace SceneUtil public: FindMaxControllerLengthVisitor(); - virtual void visit(osg::Node& , Controller& ctrl); + void visit(osg::Node& , Controller& ctrl) override; float getMaxLength() const; diff --git a/components/sceneutil/lightcontroller.hpp b/components/sceneutil/lightcontroller.hpp index 3292ae5410..36b2e868e5 100644 --- a/components/sceneutil/lightcontroller.hpp +++ b/components/sceneutil/lightcontroller.hpp @@ -26,7 +26,7 @@ namespace SceneUtil void setDiffuse(const osg::Vec4f& color); - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; private: LightType mType; diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 415bdae3a0..7f1be2eeaa 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -31,26 +31,26 @@ namespace SceneUtil LightStateAttribute(const LightStateAttribute& copy,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : osg::StateAttribute(copy,copyop), mIndex(copy.mIndex), mLights(copy.mLights) {} - unsigned int getMember() const + unsigned int getMember() const override { return mIndex; } - virtual bool getModeUsage(ModeUsage & usage) const + bool getModeUsage(ModeUsage & usage) const override { for (unsigned int i=0; i(node); lightManager->update(); @@ -295,30 +295,30 @@ namespace SceneUtil DisableLight(const DisableLight& copy,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : osg::StateAttribute(copy,copyop), mIndex(copy.mIndex) {} - virtual osg::Object* cloneType() const { return new DisableLight(mIndex); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DisableLight(*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=nullptr; } - virtual const char* libraryName() const { return "SceneUtil"; } - virtual const char* className() const { return "DisableLight"; } - virtual Type getType() const { return LIGHT; } + osg::Object* cloneType() const override { return new DisableLight(mIndex); } + osg::Object* clone(const osg::CopyOp& copyop) const override { return new DisableLight(*this,copyop); } + bool isSameKindAs(const osg::Object* obj) const override { return dynamic_cast(obj)!=nullptr; } + const char* libraryName() const override { return "SceneUtil"; } + const char* className() const override { return "DisableLight"; } + Type getType() const override { return LIGHT; } - unsigned int getMember() const + unsigned int getMember() const override { return mIndex; } - virtual bool getModeUsage(ModeUsage & usage) const + bool getModeUsage(ModeUsage & usage) const override { usage.usesMode(GL_LIGHT0 + mIndex); return true; } - virtual int compare(const StateAttribute &sa) const + int compare(const StateAttribute &sa) const override { throw std::runtime_error("DisableLight::compare: unimplemented"); } - virtual void apply(osg::State& state) const + void apply(osg::State& state) const override { int lightNum = GL_LIGHT0 + mIndex; glLightfv( lightNum, GL_AMBIENT, mnullptr.ptr() ); diff --git a/components/sceneutil/lightmanager.hpp b/components/sceneutil/lightmanager.hpp index ea6c640c4b..c370f1b7f0 100644 --- a/components/sceneutil/lightmanager.hpp +++ b/components/sceneutil/lightmanager.hpp @@ -172,7 +172,7 @@ namespace SceneUtil META_Object(SceneUtil, LightListCallback) - void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; bool pushLightState(osg::Node* node, osgUtil::CullVisitor* nv); diff --git a/components/sceneutil/morphgeometry.hpp b/components/sceneutil/morphgeometry.hpp index ba3b409618..6c492ad15f 100644 --- a/components/sceneutil/morphgeometry.hpp +++ b/components/sceneutil/morphgeometry.hpp @@ -22,7 +22,7 @@ namespace SceneUtil void setSourceGeometry(osg::ref_ptr sourceGeom); // Currently empty as this is difficult to implement. Technically we would need to compile both internal geometries in separate frames but this method is only called once. Alternatively we could compile just the static parts of the model. - virtual void compileGLObjects(osg::RenderInfo& renderInfo) const {} + void compileGLObjects(osg::RenderInfo& renderInfo) const override {} class MorphTarget { @@ -59,11 +59,11 @@ namespace SceneUtil osg::ref_ptr getSourceGeometry() const; - virtual void accept(osg::NodeVisitor &nv); - virtual bool supports(const osg::PrimitiveFunctor&) const { return true; } - virtual void accept(osg::PrimitiveFunctor&) const; + void accept(osg::NodeVisitor &nv) override; + bool supports(const osg::PrimitiveFunctor&) const override { return true; } + void accept(osg::PrimitiveFunctor&) const override; - virtual osg::BoundingBox computeBoundingBox() const; + osg::BoundingBox computeBoundingBox() const override; private: void cull(osg::NodeVisitor* nv); diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index dc22d4d806..8e5b2aa854 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -236,7 +236,7 @@ class VDSMCameraCullCallback : public osg::NodeCallback VDSMCameraCullCallback(MWShadowTechnique* vdsm, osg::Polytope& polytope); - virtual void operator()(osg::Node*, osg::NodeVisitor* nv); + void operator()(osg::Node*, osg::NodeVisitor* nv) override; osg::RefMatrix* getProjectionMatrix() { return _projectionMatrix.get(); } osgUtil::RenderStage* getRenderStage() { return _renderStage.get(); } @@ -3077,7 +3077,7 @@ class DoubleBufferCallback : public osg::Callback public: DoubleBufferCallback(osg::NodeList &children) : mChildren(children) {} - virtual bool run(osg::Object* node, osg::Object* visitor) override + bool run(osg::Object* node, osg::Object* visitor) override { // We can't use a static cast as NodeVisitor virtually inherits from Object osg::ref_ptr nodeVisitor = visitor->asNodeVisitor(); diff --git a/components/sceneutil/mwshadowtechnique.hpp b/components/sceneutil/mwshadowtechnique.hpp index bdfb44e46c..23a8e009a5 100644 --- a/components/sceneutil/mwshadowtechnique.hpp +++ b/components/sceneutil/mwshadowtechnique.hpp @@ -46,24 +46,24 @@ namespace SceneUtil { META_Object(SceneUtil, MWShadowTechnique); /** initialize the ShadowedScene and local cached data structures.*/ - virtual void init(); + void init() override; /** run the update traversal of the ShadowedScene and update any loca chached data structures.*/ - virtual void update(osg::NodeVisitor& nv); + void update(osg::NodeVisitor& nv) override; /** run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.*/ - virtual void cull(osgUtil::CullVisitor& cv); + void cull(osgUtil::CullVisitor& cv) override; /** Resize any per context GLObject buffers to specified size. */ - virtual void resizeGLObjectBuffers(unsigned int maxSize); + void resizeGLObjectBuffers(unsigned int maxSize) override; /** If State is non-zero, this function releases any associated OpenGL objects for * the specified graphics context. Otherwise, releases OpenGL objects * for all graphics contexts. */ - virtual void releaseGLObjects(osg::State* = 0) const; + void releaseGLObjects(osg::State* = 0) const override; /** Clean scene graph from any shadow technique specific nodes, state and drawables.*/ - virtual void cleanSceneGraph(); + void cleanSceneGraph() override; virtual void enableShadows(); @@ -92,19 +92,19 @@ namespace SceneUtil { public: ComputeLightSpaceBounds(osg::Viewport* viewport, const osg::Matrixd& projectionMatrix, osg::Matrixd& viewMatrix); - void apply(osg::Node& node); + void apply(osg::Node& node) override; - void apply(osg::Drawable& drawable); + void apply(osg::Drawable& drawable) override; void apply(Terrain::QuadTreeWorld& quadTreeWorld); - void apply(osg::Billboard&); + void apply(osg::Billboard&) override; - void apply(osg::Projection&); + void apply(osg::Projection&) override; - void apply(osg::Transform& transform); + void apply(osg::Transform& transform) override; - void apply(osg::Camera&); + void apply(osg::Camera&) override; using osg::NodeVisitor::apply; diff --git a/components/sceneutil/optimizer.cpp b/components/sceneutil/optimizer.cpp index b9da2d1c8d..b48ceda409 100644 --- a/components/sceneutil/optimizer.cpp +++ b/components/sceneutil/optimizer.cpp @@ -160,7 +160,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor setTraversalMode(osg::NodeVisitor::TRAVERSE_PARENTS); } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { if (node.getNumParents()) { @@ -173,7 +173,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor } } - virtual void apply(osg::LOD& lod) + void apply(osg::LOD& lod) override { _currentObjectList.push_back(&lod); @@ -182,23 +182,22 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor _currentObjectList.pop_back(); } - virtual void apply(osg::Transform& transform) + void apply(osg::Transform& transform) override { // for all current objects associated this transform with them. registerWithCurrentObjects(&transform); } - virtual void apply(osg::Geode& geode) + void apply(osg::Geode& geode) override { traverse(geode); } - virtual void apply(osg::Billboard& geode) + void apply(osg::Billboard& geode) override { traverse(geode); } - void collectDataFor(osg::Node* node) { _currentObjectList.push_back(node); @@ -1605,41 +1604,40 @@ class MergeArrayVisitor : public osg::ArrayVisitor lhs->insert(lhs->end(),rhs.begin(),rhs.end()); } - virtual void apply(osg::Array&) { OSG_WARN << "Warning: Optimizer's MergeArrayVisitor cannot merge Array type." << std::endl; } - + void apply(osg::Array&) override { OSG_WARN << "Warning: Optimizer's MergeArrayVisitor cannot merge Array type." << std::endl; } - virtual void apply(osg::ByteArray& rhs) { _merge(rhs); } - virtual void apply(osg::ShortArray& rhs) { _merge(rhs); } - virtual void apply(osg::IntArray& rhs) { _merge(rhs); } - virtual void apply(osg::UByteArray& rhs) { _merge(rhs); } - virtual void apply(osg::UShortArray& rhs) { _merge(rhs); } - virtual void apply(osg::UIntArray& rhs) { _merge(rhs); } + void apply(osg::ByteArray& rhs) override { _merge(rhs); } + void apply(osg::ShortArray& rhs) override { _merge(rhs); } + void apply(osg::IntArray& rhs) override { _merge(rhs); } + void apply(osg::UByteArray& rhs) override { _merge(rhs); } + void apply(osg::UShortArray& rhs) override { _merge(rhs); } + void apply(osg::UIntArray& rhs) override { _merge(rhs); } - virtual void apply(osg::Vec4ubArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3ubArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec2ubArray& rhs) { _merge(rhs); } + void apply(osg::Vec4ubArray& rhs) override { _merge(rhs); } + void apply(osg::Vec3ubArray& rhs) override{ _merge(rhs); } + void apply(osg::Vec2ubArray& rhs) override { _merge(rhs); } - virtual void apply(osg::Vec4usArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3usArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec2usArray& rhs) { _merge(rhs); } + void apply(osg::Vec4usArray& rhs) override { _merge(rhs); } + void apply(osg::Vec3usArray& rhs) override { _merge(rhs); } + void apply(osg::Vec2usArray& rhs) override { _merge(rhs); } - virtual void apply(osg::FloatArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec2Array& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3Array& rhs) { _merge(rhs); } - virtual void apply(osg::Vec4Array& rhs) { _merge(rhs); } + void apply(osg::FloatArray& rhs) override { _merge(rhs); } + void apply(osg::Vec2Array& rhs) override { _merge(rhs); } + void apply(osg::Vec3Array& rhs) override { _merge(rhs); } + void apply(osg::Vec4Array& rhs) override { _merge(rhs); } - virtual void apply(osg::DoubleArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec2dArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3dArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec4dArray& rhs) { _merge(rhs); } + void apply(osg::DoubleArray& rhs) override { _merge(rhs); } + void apply(osg::Vec2dArray& rhs) override { _merge(rhs); } + void apply(osg::Vec3dArray& rhs) override { _merge(rhs); } + void apply(osg::Vec4dArray& rhs) override { _merge(rhs); } - virtual void apply(osg::Vec2bArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3bArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec4bArray& rhs) { _merge(rhs); } + void apply(osg::Vec2bArray& rhs) override { _merge(rhs); } + void apply(osg::Vec3bArray& rhs) override { _merge(rhs); } + void apply(osg::Vec4bArray& rhs) override { _merge(rhs); } - virtual void apply(osg::Vec2sArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec3sArray& rhs) { _merge(rhs); } - virtual void apply(osg::Vec4sArray& rhs) { _merge(rhs); } + void apply(osg::Vec2sArray& rhs) override { _merge(rhs); } + void apply(osg::Vec3sArray& rhs) override { _merge(rhs); } + void apply(osg::Vec4sArray& rhs) override { _merge(rhs); } }; bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geometry& rhs) diff --git a/components/sceneutil/optimizer.hpp b/components/sceneutil/optimizer.hpp index d7c83e898b..2d6293e231 100644 --- a/components/sceneutil/optimizer.hpp +++ b/components/sceneutil/optimizer.hpp @@ -273,10 +273,10 @@ class Optimizer FlattenStaticTransformsVisitor(Optimizer* optimizer=0): BaseOptimizerVisitor(optimizer, FLATTEN_STATIC_TRANSFORMS) {} - virtual void apply(osg::Node& geode); - virtual void apply(osg::Drawable& drawable); - virtual void apply(osg::Billboard& geode); - virtual void apply(osg::Transform& transform); + void apply(osg::Node& geode) override; + void apply(osg::Drawable& drawable) override; + void apply(osg::Billboard& geode) override; + void apply(osg::Transform& transform) override; bool removeTransforms(osg::Node* nodeWeCannotRemove); @@ -304,7 +304,7 @@ class Optimizer CombineStaticTransformsVisitor(Optimizer* optimizer=0): BaseOptimizerVisitor(optimizer, FLATTEN_STATIC_TRANSFORMS) {} - virtual void apply(osg::MatrixTransform& transform); + void apply(osg::MatrixTransform& transform) override; bool removeTransforms(osg::Node* nodeWeCannotRemove); @@ -326,7 +326,7 @@ class Optimizer RemoveEmptyNodesVisitor(Optimizer* optimizer=0): BaseOptimizerVisitor(optimizer, REMOVE_REDUNDANT_NODES) {} - virtual void apply(osg::Group& group); + void apply(osg::Group& group) override; void removeEmptyNodes(); @@ -343,10 +343,10 @@ class Optimizer RemoveRedundantNodesVisitor(Optimizer* optimizer=0): BaseOptimizerVisitor(optimizer, REMOVE_REDUNDANT_NODES) {} - virtual void apply(osg::Group& group); - virtual void apply(osg::Transform& transform); - virtual void apply(osg::LOD& lod); - virtual void apply(osg::Switch& switchNode); + void apply(osg::Group& group) override; + void apply(osg::Transform& transform) override; + void apply(osg::LOD& lod) override; + void apply(osg::Switch& switchNode) override; bool isOperationPermissible(osg::Node& node); @@ -365,9 +365,9 @@ class Optimizer bool isOperationPermissible(osg::Group& node); - virtual void apply(osg::Group& group); - virtual void apply(osg::LOD& lod); - virtual void apply(osg::Switch& switchNode); + void apply(osg::Group& group) override; + void apply(osg::LOD& lod) override; + void apply(osg::Switch& switchNode) override; }; class MergeGeometryVisitor : public BaseOptimizerVisitor @@ -402,8 +402,8 @@ class Optimizer void popStateSet(); void checkAlphaBlendingActive(); - virtual void apply(osg::Group& group); - virtual void apply(osg::Billboard&) { /* don't do anything*/ } + void apply(osg::Group& group) override; + void apply(osg::Billboard&) override { /* don't do anything*/ } bool mergeGroup(osg::Group& group); diff --git a/components/sceneutil/positionattitudetransform.hpp b/components/sceneutil/positionattitudetransform.hpp index b6f92ee84e..9513c0e365 100644 --- a/components/sceneutil/positionattitudetransform.hpp +++ b/components/sceneutil/positionattitudetransform.hpp @@ -25,22 +25,17 @@ class PositionAttitudeTransform : public osg::Transform inline void setPosition(const osg::Vec3f& pos) { _position = pos; dirtyBound(); } inline const osg::Vec3f& getPosition() const { return _position; } - inline void setAttitude(const osg::Quat& quat) { _attitude = quat; dirtyBound(); } inline const osg::Quat& getAttitude() const { return _attitude; } - inline void setScale(const osg::Vec3f& scale) { _scale = scale; dirtyBound(); } inline const osg::Vec3f& getScale() const { return _scale; } - - - virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const; - virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const; + bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const override; + bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const override; protected : - virtual ~PositionAttitudeTransform() {} osg::Vec3f _position; diff --git a/components/sceneutil/riggeometry.hpp b/components/sceneutil/riggeometry.hpp index 801c172b36..e01583399e 100644 --- a/components/sceneutil/riggeometry.hpp +++ b/components/sceneutil/riggeometry.hpp @@ -23,7 +23,7 @@ namespace SceneUtil META_Object(SceneUtil, RigGeometry) // Currently empty as this is difficult to implement. Technically we would need to compile both internal geometries in separate frames but this method is only called once. Alternatively we could compile just the static parts of the model. - virtual void compileGLObjects(osg::RenderInfo& renderInfo) const {} + void compileGLObjects(osg::RenderInfo& renderInfo) const override {} struct BoneInfluence { @@ -46,22 +46,22 @@ namespace SceneUtil osg::ref_ptr getSourceGeometry() const; - virtual void accept(osg::NodeVisitor &nv); - virtual bool supports(const osg::PrimitiveFunctor&) const { return true; } - virtual void accept(osg::PrimitiveFunctor&) const; + void accept(osg::NodeVisitor &nv) override; + bool supports(const osg::PrimitiveFunctor&) const override{ return true; } + void accept(osg::PrimitiveFunctor&) const override; struct CopyBoundingBoxCallback : osg::Drawable::ComputeBoundingBoxCallback { osg::BoundingBox boundingBox; - virtual osg::BoundingBox computeBound(const osg::Drawable&) const override { return boundingBox; } + osg::BoundingBox computeBound(const osg::Drawable&) const override { return boundingBox; } }; struct CopyBoundingSphereCallback : osg::Node::ComputeBoundingSphereCallback { osg::BoundingSphere boundingSphere; - virtual osg::BoundingSphere computeBound(const osg::Node&) const override { return boundingSphere; } + osg::BoundingSphere computeBound(const osg::Node&) const override { return boundingSphere; } }; private: diff --git a/components/sceneutil/skeleton.cpp b/components/sceneutil/skeleton.cpp index 9be440d93e..40f524e0a2 100644 --- a/components/sceneutil/skeleton.cpp +++ b/components/sceneutil/skeleton.cpp @@ -18,7 +18,7 @@ public: { } - void apply(osg::Transform &node) + void apply(osg::Transform &node) override { osg::MatrixTransform* bone = node.asMatrixTransform(); if (!bone) diff --git a/components/sceneutil/skeleton.hpp b/components/sceneutil/skeleton.hpp index 1d8069f8e2..22988dfd5f 100644 --- a/components/sceneutil/skeleton.hpp +++ b/components/sceneutil/skeleton.hpp @@ -60,12 +60,12 @@ namespace SceneUtil bool getActive() const; - void traverse(osg::NodeVisitor& nv); + void traverse(osg::NodeVisitor& nv) override; void markDirty(); - virtual void childInserted(unsigned int); - virtual void childRemoved(unsigned int, unsigned int); + void childInserted(unsigned int) override; + void childRemoved(unsigned int, unsigned int) override; private: // The root bone is not a "real" bone, it has no corresponding node in the scene graph. diff --git a/components/sceneutil/statesetupdater.hpp b/components/sceneutil/statesetupdater.hpp index d12316fb23..25e50acfd2 100644 --- a/components/sceneutil/statesetupdater.hpp +++ b/components/sceneutil/statesetupdater.hpp @@ -24,7 +24,7 @@ namespace SceneUtil META_Object(SceneUtil, StateSetUpdater) - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); + void operator()(osg::Node* node, osg::NodeVisitor* nv) override; /// Apply state - to override in derived classes /// @note Due to the double buffering approach you *have* to apply all state @@ -57,11 +57,11 @@ namespace SceneUtil void addController(StateSetUpdater* ctrl); - virtual void apply(osg::StateSet* stateset, osg::NodeVisitor* nv); + void apply(osg::StateSet* stateset, osg::NodeVisitor* nv) override; protected: - virtual void setDefaults(osg::StateSet *stateset); + void setDefaults(osg::StateSet *stateset) override; std::vector > mCtrls; }; diff --git a/components/sceneutil/unrefqueue.hpp b/components/sceneutil/unrefqueue.hpp index 7155e669c6..84372d28c0 100644 --- a/components/sceneutil/unrefqueue.hpp +++ b/components/sceneutil/unrefqueue.hpp @@ -16,7 +16,7 @@ namespace SceneUtil { public: std::deque > mObjects; - virtual void doWork(); + void doWork() override; }; /// @brief Handles unreferencing of objects through the WorkQueue. Typical use scenario diff --git a/components/sceneutil/util.cpp b/components/sceneutil/util.cpp index ff46329e55..a23f3f1090 100644 --- a/components/sceneutil/util.cpp +++ b/components/sceneutil/util.cpp @@ -24,7 +24,7 @@ public: { } - virtual void apply(osg::Node& node) + void apply(osg::Node& node) override { if (osg::StateSet* stateset = node.getStateSet()) mLowestUnusedTexUnit = std::max(mLowestUnusedTexUnit, int(stateset->getTextureAttributeList().size())); diff --git a/components/sceneutil/util.hpp b/components/sceneutil/util.hpp index 5cc8e3a9d0..303d609f57 100644 --- a/components/sceneutil/util.hpp +++ b/components/sceneutil/util.hpp @@ -19,10 +19,10 @@ namespace SceneUtil GlowUpdater(int texUnit, const osg::Vec4f& color, const std::vector >& textures, osg::Node* node, float duration, Resource::ResourceSystem* resourcesystem); - virtual void setDefaults(osg::StateSet *stateset); + void setDefaults(osg::StateSet *stateset) override; void removeTexture(osg::StateSet* stateset); - virtual void apply(osg::StateSet *stateset, osg::NodeVisitor *nv); + void apply(osg::StateSet *stateset, osg::NodeVisitor *nv) override; bool isPermanentGlowUpdater(); diff --git a/components/sceneutil/visitor.hpp b/components/sceneutil/visitor.hpp index 02a351da7c..5e041dc454 100644 --- a/components/sceneutil/visitor.hpp +++ b/components/sceneutil/visitor.hpp @@ -20,9 +20,9 @@ namespace SceneUtil { } - virtual void apply(osg::Group& group); - virtual void apply(osg::MatrixTransform& node); - virtual void apply(osg::Geometry& node); + void apply(osg::Group& group) override; + void apply(osg::MatrixTransform& node) override; + void apply(osg::Geometry& node) override; bool checkGroup(osg::Group& group); @@ -39,7 +39,7 @@ namespace SceneUtil { } - virtual void apply(osg::Node &node); + void apply(osg::Node &node) override; std::string mNameToFind; std::vector mFoundNodes; @@ -54,9 +54,9 @@ namespace SceneUtil { } - virtual void apply(osg::MatrixTransform& node); + void apply(osg::MatrixTransform& node) override; - virtual void apply(osg::Drawable& drw); + void apply(osg::Drawable& drw) override; }; /// Maps names to nodes @@ -71,7 +71,7 @@ namespace SceneUtil { } - void apply(osg::MatrixTransform& trans); + void apply(osg::MatrixTransform& trans) override; private: NodeMap& mMap; @@ -100,10 +100,10 @@ namespace SceneUtil class CleanObjectRootVisitor : public RemoveVisitor { public: - virtual void apply(osg::Drawable& drw); - virtual void apply(osg::Group& node); - virtual void apply(osg::MatrixTransform& node); - virtual void apply(osg::Node& node); + void apply(osg::Drawable& drw) override; + void apply(osg::Group& node) override; + void apply(osg::MatrixTransform& node) override; + void apply(osg::Node& node) override; void applyNode(osg::Node& node); void applyDrawable(osg::Node& node); @@ -112,9 +112,9 @@ namespace SceneUtil class RemoveTriBipVisitor : public RemoveVisitor { public: - virtual void apply(osg::Drawable& drw); - virtual void apply(osg::Group& node); - virtual void apply(osg::MatrixTransform& node); + void apply(osg::Drawable& drw) override; + void apply(osg::Group& node) override; + void apply(osg::MatrixTransform& node) override; void applyImpl(osg::Node& node); }; diff --git a/components/sceneutil/waterutil.cpp b/components/sceneutil/waterutil.cpp index 3a17963afd..8a434105c8 100644 --- a/components/sceneutil/waterutil.cpp +++ b/components/sceneutil/waterutil.cpp @@ -10,7 +10,7 @@ namespace SceneUtil // disable nonsense test against a worldsize bb what will always pass class WaterBoundCallback : public osg::Drawable::ComputeBoundingBoxCallback { - virtual osg::BoundingBox computeBound(const osg::Drawable&) const { return osg::BoundingBox(); } + osg::BoundingBox computeBound(const osg::Drawable&) const override { return osg::BoundingBox(); } }; osg::ref_ptr createWaterGeometry(float size, int segments, float textureRepeats) diff --git a/components/sdlutil/sdlgraphicswindow.hpp b/components/sdlutil/sdlgraphicswindow.hpp index dd8076776d..01a97e7545 100644 --- a/components/sdlutil/sdlgraphicswindow.hpp +++ b/components/sdlutil/sdlgraphicswindow.hpp @@ -24,53 +24,53 @@ class GraphicsWindowSDL2 : public osgViewer::GraphicsWindow public: GraphicsWindowSDL2(osg::GraphicsContext::Traits *traits); - virtual bool isSameKindAs(const Object* object) const { return dynamic_cast(object)!=0; } - virtual const char* libraryName() const { return "osgViewer"; } - virtual const char* className() const { return "GraphicsWindowSDL2"; } + bool isSameKindAs(const Object* object) const override { return dynamic_cast(object)!=0; } + const char* libraryName() const override { return "osgViewer"; } + const char* className() const override { return "GraphicsWindowSDL2"; } - virtual bool valid() const { return mValid; } + bool valid() const override { return mValid; } /** Realise the GraphicsContext.*/ - virtual bool realizeImplementation(); + bool realizeImplementation()override ; /** Return true if the graphics context has been realised and is ready to use.*/ - virtual bool isRealizedImplementation() const { return mRealized; } + bool isRealizedImplementation() const override { return mRealized; } /** Close the graphics context.*/ - virtual void closeImplementation(); + void closeImplementation() override; /** Make this graphics context current.*/ - virtual bool makeCurrentImplementation(); + bool makeCurrentImplementation() override; /** Release the graphics context.*/ - virtual bool releaseContextImplementation(); + bool releaseContextImplementation() override; /** Swap the front and back buffers.*/ - virtual void swapBuffersImplementation(); + void swapBuffersImplementation() override; /** Set sync-to-vblank. */ - virtual void setSyncToVBlank(bool on); + void setSyncToVBlank(bool on) override; /** Set Window decoration.*/ - virtual bool setWindowDecorationImplementation(bool flag); + bool setWindowDecorationImplementation(bool flag) override; /** Raise specified window */ - virtual void raiseWindow(); + void raiseWindow() override; /** Set the window's position and size.*/ - virtual bool setWindowRectangleImplementation(int x, int y, int width, int height); + bool setWindowRectangleImplementation(int x, int y, int width, int height) override; /** Set the name of the window */ - virtual void setWindowName(const std::string &name); + void setWindowName(const std::string &name) override; /** Set mouse cursor to a specific shape.*/ - virtual void setCursor(MouseCursor cursor); + void setCursor(MouseCursor cursor) override; /** Get focus.*/ - virtual void grabFocus() {} + void grabFocus() override {} /** Get focus on if the pointer is in this window.*/ - virtual void grabFocusIfPointerInWindow() {} + void grabFocusIfPointerInWindow() override {} /** WindowData is used to pass in the SDL2 window handle attached to the GraphicsContext::Traits structure. */ struct WindowData : public osg::Referenced diff --git a/components/shader/shadervisitor.hpp b/components/shader/shadervisitor.hpp index 8e35f1d9c6..bf10221801 100644 --- a/components/shader/shadervisitor.hpp +++ b/components/shader/shadervisitor.hpp @@ -38,10 +38,10 @@ namespace Shader void setSpecularMapPattern(const std::string& pattern); - virtual void apply(osg::Node& node); + void apply(osg::Node& node) override; - virtual void apply(osg::Drawable& drawable); - virtual void apply(osg::Geometry& geometry); + void apply(osg::Drawable& drawable) override; + void apply(osg::Geometry& geometry) override; void applyStateSet(osg::ref_ptr stateset, osg::Node& node); diff --git a/components/terrain/chunkmanager.hpp b/components/terrain/chunkmanager.hpp index 02a782c625..118df698f1 100644 --- a/components/terrain/chunkmanager.hpp +++ b/components/terrain/chunkmanager.hpp @@ -42,7 +42,7 @@ namespace Terrain void setMaxCompositeGeometrySize(float maxCompGeometrySize) { mMaxCompGeometrySize = maxCompGeometrySize; } void setNodeMask(unsigned int mask) { mNodeMask = mask; } - virtual unsigned int getNodeMask() override { return mNodeMask; } + unsigned int getNodeMask() override { return mNodeMask; } void reportStats(unsigned int frameNumber, osg::Stats* stats) const override; diff --git a/components/terrain/compositemaprenderer.hpp b/components/terrain/compositemaprenderer.hpp index 9d5719c233..257173af46 100644 --- a/components/terrain/compositemaprenderer.hpp +++ b/components/terrain/compositemaprenderer.hpp @@ -41,7 +41,7 @@ namespace Terrain CompositeMapRenderer(); ~CompositeMapRenderer(); - virtual void drawImplementation(osg::RenderInfo& renderInfo) const; + void drawImplementation(osg::RenderInfo& renderInfo) const override; void compile(CompositeMap& compositeMap, osg::RenderInfo& renderInfo, double* timeLeft) const; diff --git a/components/terrain/quadtreenode.hpp b/components/terrain/quadtreenode.hpp index a309d91fc8..7ae59b92f0 100644 --- a/components/terrain/quadtreenode.hpp +++ b/components/terrain/quadtreenode.hpp @@ -42,7 +42,7 @@ namespace Terrain inline QuadTreeNode* getParent() { return mParent; } inline QuadTreeNode* getChild(unsigned int i) { return static_cast(Group::getChild(i)); } - inline unsigned int getNumChildren() const { return _children.size(); } + inline unsigned int getNumChildren() const override { return _children.size(); } // osg::Group::addChild() does a lot of unrelated stuff, but we just really want to add a child node. void addChildNode(QuadTreeNode* child) diff --git a/components/terrain/quadtreeworld.cpp b/components/terrain/quadtreeworld.cpp index ca1dcb08ce..57c09000c1 100644 --- a/components/terrain/quadtreeworld.cpp +++ b/components/terrain/quadtreeworld.cpp @@ -61,7 +61,7 @@ public: { } - virtual ReturnValue isSufficientDetail(QuadTreeNode* node, float dist) + ReturnValue isSufficientDetail(QuadTreeNode* node, float dist) override { const osg::Vec2f& center = node->getCenter(); bool activeGrid = (center.x() > mActiveGrid.x() && center.y() > mActiveGrid.y() && center.x() < mActiveGrid.z() && center.y() < mActiveGrid.w()); @@ -106,7 +106,7 @@ public: mWorld = world; } - virtual void accept(osg::NodeVisitor &nv) + void accept(osg::NodeVisitor &nv) override { if (!nv.validNodeMask(*this)) return; diff --git a/components/terrain/terraindrawable.hpp b/components/terrain/terraindrawable.hpp index a84200f669..dbfdd3c80a 100644 --- a/components/terrain/terraindrawable.hpp +++ b/components/terrain/terraindrawable.hpp @@ -30,17 +30,17 @@ namespace Terrain class TerrainDrawable : public osg::Geometry { public: - virtual osg::Object* cloneType() const { return new TerrainDrawable (); } - virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new TerrainDrawable (*this,copyop); } - virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=nullptr; } - virtual const char* className() const { return "TerrainDrawable"; } - virtual const char* libraryName() const { return "Terrain"; } + osg::Object* cloneType() const override { return new TerrainDrawable (); } + osg::Object* clone(const osg::CopyOp& copyop) const override { return new TerrainDrawable (*this,copyop); } + bool isSameKindAs(const osg::Object* obj) const override { return dynamic_cast(obj)!=nullptr; } + const char* className() const override { return "TerrainDrawable"; } + const char* libraryName() const override { return "Terrain"; } TerrainDrawable(); ~TerrainDrawable(); // has to be defined in the cpp file because we only forward declared some members. TerrainDrawable(const TerrainDrawable& copy, const osg::CopyOp& copyop); - virtual void accept(osg::NodeVisitor &nv); + void accept(osg::NodeVisitor &nv) override; void cull(osgUtil::CullVisitor* cv); typedef std::vector > PassVector; @@ -50,7 +50,7 @@ namespace Terrain void createClusterCullingCallback(); - virtual void compileGLObjects(osg::RenderInfo& renderInfo) const; + void compileGLObjects(osg::RenderInfo& renderInfo) const override; void setupWaterBoundingBox(float waterheight, float margin); const osg::BoundingBox& getWaterBoundingBox() const { return mWaterBoundingBox; } diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index 5f99cd97eb..679597971e 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -17,7 +17,7 @@ class MyView : public View public: osg::ref_ptr mLoaded; - virtual void reset() {} + void reset() override {} }; TerrainGrid::TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask, int borderMask) diff --git a/components/terrain/terraingrid.hpp b/components/terrain/terraingrid.hpp index 8b36448c1a..f8b0fb2590 100644 --- a/components/terrain/terraingrid.hpp +++ b/components/terrain/terraingrid.hpp @@ -17,15 +17,15 @@ namespace Terrain TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask=~0, int borderMask=0); ~TerrainGrid(); - virtual void cacheCell(View* view, int x, int y); + void cacheCell(View* view, int x, int y) override; /// @note Not thread safe. - virtual void loadCell(int x, int y); + void loadCell(int x, int y) override; /// @note Not thread safe. - virtual void unloadCell(int x, int y); + void unloadCell(int x, int y) override; - View* createView(); + View* createView() override; protected: bool isGridEmpty() const { return mGrid.empty(); } diff --git a/components/terrain/texturemanager.hpp b/components/terrain/texturemanager.hpp index e1205606e7..46c363055d 100644 --- a/components/terrain/texturemanager.hpp +++ b/components/terrain/texturemanager.hpp @@ -27,7 +27,7 @@ namespace Terrain osg::ref_ptr getTexture(const std::string& name); - virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const; + void reportStats(unsigned int frameNumber, osg::Stats* stats) const override; private: Resource::SceneManager* mSceneManager; diff --git a/components/terrain/viewdata.hpp b/components/terrain/viewdata.hpp index 400d9fbbea..0289352585 100644 --- a/components/terrain/viewdata.hpp +++ b/components/terrain/viewdata.hpp @@ -21,7 +21,7 @@ namespace Terrain void add(QuadTreeNode* node); - void reset(); + void reset() override; bool suitableToUse(const osg::Vec4i& activeGrid) const; diff --git a/components/terrain/world.hpp b/components/terrain/world.hpp index 9f08454c8c..d94125100e 100644 --- a/components/terrain/world.hpp +++ b/components/terrain/world.hpp @@ -70,7 +70,7 @@ namespace Terrain return mMask; } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { if (mLowZ <= mHighZ) traverse(node, nv); diff --git a/components/vfs/bsaarchive.hpp b/components/vfs/bsaarchive.hpp index a87f278c76..65a9db16c1 100644 --- a/components/vfs/bsaarchive.hpp +++ b/components/vfs/bsaarchive.hpp @@ -12,7 +12,7 @@ namespace VFS public: BsaArchiveFile(const Bsa::BSAFile::FileStruct* info, Bsa::BSAFile* bsa); - virtual Files::IStreamPtr open(); + Files::IStreamPtr open() override; const Bsa::BSAFile::FileStruct* mInfo; Bsa::BSAFile* mFile; @@ -23,7 +23,7 @@ namespace VFS public: BsaArchive(const std::string& filename); virtual ~BsaArchive(); - virtual void listResources(std::map& out, char (*normalize_function) (char)); + void listResources(std::map& out, char (*normalize_function) (char)) override; private: std::unique_ptr mFile; diff --git a/components/vfs/filesystemarchive.hpp b/components/vfs/filesystemarchive.hpp index 6c8e1b82bb..d228ba87c5 100644 --- a/components/vfs/filesystemarchive.hpp +++ b/components/vfs/filesystemarchive.hpp @@ -11,7 +11,7 @@ namespace VFS public: FileSystemArchiveFile(const std::string& path); - virtual Files::IStreamPtr open(); + Files::IStreamPtr open() override; private: std::string mPath; @@ -23,7 +23,7 @@ namespace VFS public: FileSystemArchive(const std::string& path); - virtual void listResources(std::map& out, char (*normalize_function) (char)); + void listResources(std::map& out, char (*normalize_function) (char)) override; private: diff --git a/components/widgets/fontwrapper.hpp b/components/widgets/fontwrapper.hpp index 8b0011dda9..daa69f9202 100644 --- a/components/widgets/fontwrapper.hpp +++ b/components/widgets/fontwrapper.hpp @@ -11,14 +11,14 @@ namespace Gui class FontWrapper : public T { public: - virtual void setFontName(const std::string& name) + void setFontName(const std::string& name) override { T::setFontName(name); T::setPropertyOverride ("FontHeight", getFontSize()); } protected: - virtual void setPropertyOverride(const std::string& _key, const std::string& _value) + void setPropertyOverride(const std::string& _key, const std::string& _value) override { T::setPropertyOverride (_key, _value); diff --git a/extern/oics/tinyxml.h b/extern/oics/tinyxml.h index 7237825c5d..7b5daedf94 100644 --- a/extern/oics/tinyxml.h +++ b/extern/oics/tinyxml.h @@ -865,10 +865,11 @@ public: /* Attribute parsing starts: first letter of the name returns: the next char after the value end quote */ - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; // Prints this Attribute to a FILE stream. - virtual void Print( FILE* cfile, int depth ) const { + void Print( FILE* cfile, int depth ) const override + { Print( cfile, depth, 0 ); } void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; @@ -1112,21 +1113,21 @@ public: const char* GetText() const; /// Creates a new Element and returns it - the returned element is a copy. - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; // Print the Element to a FILE stream. - virtual void Print( FILE* cfile, int depth ) const; + void Print( FILE* cfile, int depth ) const override; /* Attribtue parsing starts: next char past '<' returns: next char past '>' */ - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; - virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlElement* ToElement() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlElement* ToElement() override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* visitor ) const; + bool Accept( TiXmlVisitor* visitor ) const override; protected: @@ -1135,7 +1136,7 @@ protected: // Used to be public [internal use] #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif /* [internal use] Reads the "value" of the element -- another element, or text. @@ -1166,28 +1167,28 @@ public: virtual ~TiXmlComment() {} /// Returns a copy of this Comment. - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; // Write this Comment to a FILE stream. - virtual void Print( FILE* cfile, int depth ) const; + void Print( FILE* cfile, int depth ) const override; /* Attribtue parsing starts: at the ! of the !-- returns: next char past '>' */ - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; - virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlComment* ToComment() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlComment* ToComment() override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* visitor ) const; + bool Accept( TiXmlVisitor* visitor ) const override; protected: void CopyTo( TiXmlComment* target ) const; // used to be public #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif // virtual void StreamOut( TIXML_OSTREAM * out ) const; @@ -1229,31 +1230,31 @@ public: void operator=( const TiXmlText& base ) { base.CopyTo( this ); } // Write this text object to a FILE stream. - virtual void Print( FILE* cfile, int depth ) const; + void Print( FILE* cfile, int depth ) const override; /// Queries whether this represents text using a CDATA section. bool CDATA() const { return cdata; } /// Turns on or off a CDATA representation of text. void SetCDATA( bool _cdata ) { cdata = _cdata; } - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; - virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlText* ToText() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlText* ToText() override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* content ) const; + bool Accept( TiXmlVisitor* content ) const override; protected : /// [internal use] Creates a new Element and returns it. - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; void CopyTo( TiXmlText* target ) const; bool Blank() const; // returns true if all white space and new lines // [internal use] #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif private: @@ -1305,27 +1306,28 @@ public: const char *Standalone() const { return standalone.c_str (); } /// Creates a copy of this Declaration and returns it. - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; // Print this declaration to a FILE stream. virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; - virtual void Print( FILE* cfile, int depth ) const { + void Print( FILE* cfile, int depth ) const override + { Print( cfile, depth, 0 ); } - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; - virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlDeclaration* ToDeclaration() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlDeclaration* ToDeclaration()override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* visitor ) const; + bool Accept( TiXmlVisitor* visitor ) const override; protected: void CopyTo( TiXmlDeclaration* target ) const; // used to be public #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif private: @@ -1353,24 +1355,24 @@ public: void operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); } /// Creates a copy of this Unknown and returns it. - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; // Print this Unknown to a FILE stream. - virtual void Print( FILE* cfile, int depth ) const; + void Print( FILE* cfile, int depth ) const override; - virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) override; - virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlUnknown* ToUnknown() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlUnknown* ToUnknown()override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* content ) const; + bool Accept( TiXmlVisitor* content ) const override; protected: void CopyTo( TiXmlUnknown* target ) const; #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif private: @@ -1439,7 +1441,7 @@ public: method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml to use that encoding, regardless of what TinyXml might otherwise try to detect. */ - virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) override; /** Get the root element -- the only top level element -- of the document. In well formed XML, there should only be one. TinyXml is tolerant of @@ -1521,22 +1523,22 @@ public: //char* PrintToMemory() const; /// Print this Document to a FILE stream. - virtual void Print( FILE* cfile, int depth = 0 ) const; + void Print( FILE* cfile, int depth = 0 ) const override; // [internal use] void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); - virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. - virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + const TiXmlDocument* ToDocument() const override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + TiXmlDocument* ToDocument() override { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ - virtual bool Accept( TiXmlVisitor* content ) const; + bool Accept( TiXmlVisitor* content ) const override; protected : // [internal use] - virtual TiXmlNode* Clone() const; + TiXmlNode* Clone() const override; #ifdef TIXML_USE_STL - virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ) override; #endif private: @@ -1736,16 +1738,16 @@ public: TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), buffer(), indent( " " ), lineBreak( "\n" ) {} - virtual bool VisitEnter( const TiXmlDocument& doc ); - virtual bool VisitExit( const TiXmlDocument& doc ); + bool VisitEnter( const TiXmlDocument& doc ) override; + bool VisitExit( const TiXmlDocument& doc ) override; - virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); - virtual bool VisitExit( const TiXmlElement& element ); + bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) override; + bool VisitExit( const TiXmlElement& element ) override; - virtual bool Visit( const TiXmlDeclaration& declaration ); - virtual bool Visit( const TiXmlText& text ); - virtual bool Visit( const TiXmlComment& comment ); - virtual bool Visit( const TiXmlUnknown& unknown ); + bool Visit( const TiXmlDeclaration& declaration ) override; + bool Visit( const TiXmlText& text ) override; + bool Visit( const TiXmlComment& comment ) override; + bool Visit( const TiXmlUnknown& unknown ) override; /** Set the indent characters for printing. By default 4 spaces but tab (\t) is also useful, or null/empty string for no indentation. diff --git a/extern/osgQt/GraphicsWindowQt b/extern/osgQt/GraphicsWindowQt index 5b1e537348..18fcb754f5 100644 --- a/extern/osgQt/GraphicsWindowQt +++ b/extern/osgQt/GraphicsWindowQt @@ -84,10 +84,10 @@ protected: qreal _devicePixelRatio; - virtual void resizeEvent( QResizeEvent* event ); - virtual void moveEvent( QMoveEvent* event ); - virtual void glDraw(); - virtual bool event( QEvent* event ); + void resizeEvent( QResizeEvent* event ) override; + void moveEvent( QMoveEvent* event ) override; + void glDraw() override; + bool event( QEvent* event ) override; }; class GraphicsWindowQt : public osgViewer::GraphicsWindow @@ -118,28 +118,28 @@ public: static void qglFormat2traits( const QGLFormat& format, osg::GraphicsContext::Traits* traits ); static osg::GraphicsContext::Traits* createTraits( const QGLWidget* widget ); - virtual bool setWindowRectangleImplementation( int x, int y, int width, int height ); - virtual void getWindowRectangle( int& x, int& y, int& width, int& height ); - virtual bool setWindowDecorationImplementation( bool windowDecoration ); - virtual bool getWindowDecoration() const; - virtual void grabFocus(); - virtual void grabFocusIfPointerInWindow(); - virtual void raiseWindow(); - virtual void setWindowName( const std::string& name ); - virtual std::string getWindowName(); - virtual void useCursor( bool cursorOn ); - virtual void setCursor( MouseCursor cursor ); - - virtual bool valid() const; - virtual bool realizeImplementation(); - virtual bool isRealizedImplementation() const; - virtual void closeImplementation(); - virtual bool makeCurrentImplementation(); - virtual bool releaseContextImplementation(); - virtual void swapBuffersImplementation(); - virtual void runOperations(); - - virtual void requestWarpPointer( float x, float y ); + bool setWindowRectangleImplementation( int x, int y, int width, int height ) override; + void getWindowRectangle( int& x, int& y, int& width, int& height ) override; + bool setWindowDecorationImplementation( bool windowDecoration ) override; + bool getWindowDecoration() const override; + void grabFocus() override; + void grabFocusIfPointerInWindow( )override; + void raiseWindow() override; + void setWindowName( const std::string& name ) override; + std::string getWindowName() override; + void useCursor( bool cursorOn ) override; + void setCursor( MouseCursor cursor ) override; + + bool valid() const override; + bool realizeImplementation() override; + bool isRealizedImplementation() const override; + void closeImplementation() override; + bool makeCurrentImplementation() override; + bool releaseContextImplementation() override; + void swapBuffersImplementation() override; + void runOperations() override; + + void requestWarpPointer( float x, float y ) override; protected: diff --git a/extern/osgQt/GraphicsWindowQt.cpp b/extern/osgQt/GraphicsWindowQt.cpp index 784cf9179f..4755ad4a8b 100644 --- a/extern/osgQt/GraphicsWindowQt.cpp +++ b/extern/osgQt/GraphicsWindowQt.cpp @@ -564,7 +564,7 @@ public: } // Return the number of screens present in the system - virtual unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& /*si*/ ) + unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& /*si*/ ) override { OSG_WARN << "osgQt: getNumScreens() not implemented yet." << std::endl; return 0; @@ -572,26 +572,26 @@ public: // Return the resolution of specified screen // (0,0) is returned if screen is unknown - virtual void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, osg::GraphicsContext::ScreenSettings & /*resolution*/ ) + void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, osg::GraphicsContext::ScreenSettings & /*resolution*/ ) override { OSG_WARN << "osgQt: getScreenSettings() not implemented yet." << std::endl; } // Set the resolution for given screen - virtual bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, const osg::GraphicsContext::ScreenSettings & /*resolution*/ ) + bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, const osg::GraphicsContext::ScreenSettings & /*resolution*/ ) override { OSG_WARN << "osgQt: setScreenSettings() not implemented yet." << std::endl; return false; } // Enumerates available resolutions - virtual void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*screenIdentifier*/, osg::GraphicsContext::ScreenSettingsList & /*resolution*/ ) + void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*screenIdentifier*/, osg::GraphicsContext::ScreenSettingsList & /*resolution*/ ) override { OSG_WARN << "osgQt: enumerateScreenSettings() not implemented yet." << std::endl; } // Create a graphics context with given traits - virtual osg::GraphicsContext* createGraphicsContext( osg::GraphicsContext::Traits* traits ) + osg::GraphicsContext* createGraphicsContext( osg::GraphicsContext::Traits* traits ) override { if (traits->pbuffer) { diff --git a/extern/recastnavigation/DebugUtils/Include/DebugDraw.h b/extern/recastnavigation/DebugUtils/Include/DebugDraw.h index 00b544d1c0..f47df0b7bf 100644 --- a/extern/recastnavigation/DebugUtils/Include/DebugDraw.h +++ b/extern/recastnavigation/DebugUtils/Include/DebugDraw.h @@ -206,11 +206,11 @@ class duDisplayList : public duDebugDraw public: duDisplayList(int cap = 512); ~duDisplayList(); - virtual void depthMask(bool state); - virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f); - virtual void vertex(const float x, const float y, const float z, unsigned int color); - virtual void vertex(const float* pos, unsigned int color); - virtual void end(); + void depthMask(bool state) override; + void begin(duDebugDrawPrimitives prim, float size = 1.0f) override; + void vertex(const float x, const float y, const float z, unsigned int color) override; + void vertex(const float* pos, unsigned int color) override; + void end() override; void clear(); void draw(struct duDebugDraw* dd); private: diff --git a/extern/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp b/extern/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp index 839ee1e815..265b10b34a 100644 --- a/extern/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp +++ b/extern/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp @@ -640,7 +640,7 @@ public: dtPolyRef nearestRef() const { return m_nearestRef; } const float* nearestPoint() const { return m_nearestPoint; } - void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) + void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) override { dtIgnoreUnused(polys); @@ -842,7 +842,7 @@ public: int numCollected() const { return m_numCollected; } bool overflowed() const { return m_overflow; } - void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) + void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) override { dtIgnoreUnused(tile); dtIgnoreUnused(polys);