mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-27 20:28:27 +00:00
d087c9605f
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. |
||
---|---|---|
.. | ||
access | ||
adl | ||
agi | ||
agos | ||
avalanche | ||
bbvs | ||
bladerunner | ||
cge | ||
cge2 | ||
chewy | ||
cine | ||
composer | ||
cruise | ||
cryo | ||
director | ||
dm | ||
draci | ||
drascula | ||
dreamweb | ||
fullpipe | ||
gnap | ||
gob | ||
groovie | ||
hopkins | ||
hugo | ||
kyra | ||
lab | ||
lastexpress | ||
lure | ||
macventure | ||
made | ||
mads | ||
mohawk | ||
mortevielle | ||
neverhood | ||
parallaction | ||
pegasus | ||
plumbers | ||
prince | ||
queen | ||
saga | ||
sci | ||
scumm | ||
sherlock | ||
sky | ||
sludge | ||
sword1 | ||
sword2 | ||
sword25 | ||
teenagent | ||
testbed | ||
tinsel | ||
titanic | ||
toltecs | ||
tony | ||
toon | ||
touche | ||
tsage | ||
tucker | ||
voyeur | ||
wage | ||
wintermute | ||
xeen | ||
zvision | ||
advancedDetector.cpp | ||
advancedDetector.h | ||
dialogs.cpp | ||
dialogs.h | ||
engine.cpp | ||
engine.h | ||
game.cpp | ||
game.h | ||
logo_data.h | ||
metaengine.h | ||
module.mk | ||
obsolete.cpp | ||
obsolete.h | ||
savestate.cpp | ||
savestate.h | ||
util.h |