1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-16 18:30:32 +00:00

Switches to a static_cast. No need for reflection here.

This commit is contained in:
Thomas Harte 2021-06-08 17:37:28 -04:00
parent 70851f3b2d
commit de3b37799c

View File

@ -28,10 +28,17 @@
- (void)setUseSquarePixels:(BOOL)useSquarePixels {
Configurable::Device *const configurable = dynamic_cast<Configurable::Device *>(_appleII);
#ifndef NDEBUG
assert(configurable);
#endif
@synchronized(_machine) {
auto options = configurable->get_options();
auto appleii_configurable = dynamic_cast<Apple::II::Machine::Options *>(options.get());
#ifndef NDEBUG
assert(dynamic_cast<Apple::II::Machine::Options *>(options.get()));
#endif
auto appleii_configurable = static_cast<Apple::II::Machine::Options *>(options.get());
appleii_configurable->use_square_pixels = useSquarePixels;
configurable->set_options(options);
}