Fix a bug causing the program not to start
This bug was introduced in ac4799abafbeb1d44d1b7166913406cd3a46b560. This bug apparently only affected MSVC since the evaluation order of function call parameters respect to other parameters is unspecified by the C++ specification. Fixes #785.
This commit is contained in:
parent
cafb664e8e
commit
3cd581260a
@ -144,5 +144,13 @@ namespace spades {
|
||||
ptr = nullptr;
|
||||
return {other, false};
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to cast this `Handle<T>` to `Handle<S>` using `dynamic_cast`.
|
||||
* Throws an exception if the cast was unsuccessful.
|
||||
*/
|
||||
template <class S> Handle<S> Cast() const & {
|
||||
return Handle{*this}.Cast<S>();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ namespace spades {
|
||||
auto port = Handle<SDLSWPort>::New(wnd);
|
||||
return std::make_tuple(
|
||||
Handle<draw::SWRenderer>::New(port).Cast<client::IRenderer>(),
|
||||
std::move(port).Cast<Disposable>());
|
||||
port.Cast<Disposable>());
|
||||
}
|
||||
default: SPRaise("Invalid renderer type");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user