scummvm/gui
Colin Snover d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
..
animation GUI: Added animation classes 2016-08-24 16:07:55 +06:00
themes I18N: Regenerate translations data file 2017-11-27 05:05:07 +01:00
widgets GUI: Mark some fall-through cases as intentional 2017-08-06 17:55:33 +02:00
about.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
about.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Actions.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Actions.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
browser.cpp GUI: Fix hidden files visibility getting out of sync in the files browser 2016-08-30 21:19:59 +02:00
browser.h OSX: Make sure the native file browser runs in the main thread 2017-07-26 23:31:24 +01:00
browser_osx.mm OSX: Make sure the native file browser runs in the main thread 2017-07-26 23:31:24 +01:00
chooser.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
chooser.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
console.cpp GUI: Remove code that closes debugger if # or ~ keys are pressed 2017-09-05 19:36:47 -04:00
console.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
credits.h CREDITS: Add credits for RISC OS port 2017-11-21 14:51:14 -06:00
debugger.cpp GUI: Fix memory leak with empty debugger input 2017-09-29 18:15:49 +02:00
debugger.h GUI: Add support for double quoted parameters in debugger 2017-09-04 10:04:26 -04:00
dialog.cpp GUI: Focus the first 'focusable' widget when rebuilding dialogs 2017-06-13 07:21:34 +02:00
dialog.h GUI: Focus the first 'focusable' widget when rebuilding dialogs 2017-06-13 07:21:34 +02:00
downloaddialog.cpp GUI: Fix indentation to silence GCC 6 warning 2016-09-05 18:08:51 +02:00
downloaddialog.h JANITORIAL: Remove spaces at the end of the line 2016-08-24 16:07:55 +06:00
editgamedialog.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
editgamedialog.h GUI: Add Apply button in global options dialog 2016-10-30 15:43:14 +00:00
editrecorddialog.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
editrecorddialog.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
error.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
error.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
EventRecorder.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
EventRecorder.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
filebrowser-dialog.cpp BBVS: Implement file chooser for Air Guitar minigame 2015-11-07 13:26:55 +01:00
filebrowser-dialog.h BBVS: Implement file chooser for Air Guitar minigame 2015-11-07 13:26:55 +01:00
fluidsynth-dialog.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
fluidsynth-dialog.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
gui-manager.cpp Revert "COMMON: Change way the Singleton instances are instantiated" 2017-07-10 21:17:41 +02:00
gui-manager.h GUI: Allow delayed deletion of GuiObject 2017-03-10 02:02:58 +00:00
Key.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Key.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
KeysDialog.cpp GUI: Replace sprintf() with safer String::format() in KeysDialog. 2017-01-12 09:46:14 +00:00
KeysDialog.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
launcher.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
launcher.h GUI: Add possibility to rebuild the launcher dialog 2016-10-30 18:56:35 +00:00
massadd.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
massadd.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
message.cpp GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
message.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
module.mk GUI: Fix non-macOS/iOS builds 2017-09-10 22:35:02 -05:00
object.cpp GUI: Add checks in Widget::getBossClipRect() 2016-07-03 12:24:56 +02:00
object.h GUI: Add "Run server" button in Cloud tab 2016-08-24 16:07:55 +06:00
onscreendialog.cpp GUI: Use "button" instead of "btn" in variable names. 2016-01-24 03:41:29 +01:00
onscreendialog.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
options.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
options.h GUI: Remove mostly-broken audio output sample rate control 2017-09-12 11:27:45 -05:00
predictivedialog.cpp GUI: Cleanup class initialization 2016-06-01 13:16:12 +02:00
predictivedialog.h GUI: Remove 'sticky button' feature 2016-04-14 18:37:12 +03:00
recorderdialog.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
recorderdialog.h GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
remotebrowser.cpp CLOUD: Improve some labels 2016-09-04 23:25:54 +01:00
remotebrowser.h GUI: Add error message in RemoteBrowser 2016-08-24 16:07:55 +06:00
saveload-dialog.cpp GUI: Fix Signed vs. Unsigned Comparison GCC Compiler Warning. 2017-11-27 11:39:58 +00:00
saveload-dialog.h ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02:00
saveload.cpp BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
saveload.h BASE: Remove bad casts between incompatible Plugin types 2017-12-03 20:26:38 -06:00
storagewizarddialog.cpp JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
storagewizarddialog.h GUI: Add Container in StorageWizardDialog 2016-08-24 16:07:55 +06:00
themebrowser.cpp GUI: Only change theme when applying new options 2016-10-30 16:25:42 +00:00
themebrowser.h GUI: Only change theme when applying new options 2016-10-30 16:25:42 +00:00
ThemeEngine.cpp GUI: Mark some fall-through cases as intentional 2017-08-06 17:55:33 +02:00
ThemeEngine.h GUI: Give each tab in TabWidget its own width 2017-02-28 15:55:52 +01:00
ThemeEval.cpp JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
ThemeEval.h GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
ThemeLayout.cpp GRAPHICS: Restore layout debugging capabilities 2016-06-01 13:16:12 +02:00
ThemeLayout.h JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
ThemeParser.cpp ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
ThemeParser.h GUI: Implemented alphabitmap autoscale 2016-08-24 16:07:55 +06:00
Tooltip.cpp GUI: More object initialization cleanup 2016-06-01 13:16:12 +02:00
Tooltip.h GUI: When dialogs gain focus, inform them of the current mouse position 2016-04-06 17:51:30 +03:00
updates-dialog.cpp GUI: Cleanup 2017-10-15 20:55:31 +02:00
updates-dialog.h GUI: UPDATES: Redesign updates dialog as suggested by criezy in PR#1040 2017-10-15 15:53:57 +02:00
widget.cpp GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00
widget.h GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00