10 Commits

Author SHA1 Message Date
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
Ori Avtalion
253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03:00
Thierry Crozat
f2827f0fe5 I18N: Mark additional string for translation 2015-10-11 18:57:54 +01:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
ddcfdf5329 GUI: Allow the event recorder dialog to be closed.
This is a regression from 6e4217e1ba1df9fd2ee4cd0d61151ed7dfc53021.

setResult does not automatically close the dialog. However,
Dialog::handleCommand will close the dialog when kCloseCmd is received.
2013-07-15 13:40:59 +02:00
Sven Hesse
5e835ef915 RECORDER: Fix indenting 2013-07-14 19:04:09 +02:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Eugene Sandulenko
6e4217e1ba RECORDER: Fix CID 1046887. Missing break in switch 2013-07-14 19:35:17 +03:00
Eugene Sandulenko
54d0eef6f2 RECORDER: Fix CID 1046882. Uninitalized variables 2013-07-14 19:30:35 +03:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00