This commit is contained in:
Henrik Rydgård 2024-10-10 12:19:53 +02:00
parent 3ef2ed32f3
commit 9c5cda3487
3 changed files with 3 additions and 9 deletions

View File

@ -633,7 +633,7 @@ ID3D11DepthStencilState *D3D11DrawContext::GetCachedDepthStencilState(const D3D1
DepthStencilState *D3D11DrawContext::CreateDepthStencilState(const DepthStencilStateDesc &desc) {
D3D11DepthStencilState *dss = new D3D11DepthStencilState();
dss->desc = desc;
return dynamic_cast<DepthStencilState *>(dss);
return static_cast<DepthStencilState *>(dss);
}
BlendState *D3D11DrawContext::CreateBlendState(const BlendStateDesc &desc) {

View File

@ -26,11 +26,6 @@
#include "UI/MiscScreens.h"
#include "UI/Screen.h"
enum class PauseScreenMode {
MAIN,
DISPLAY_SETTINGS,
};
class GamePauseScreen : public UIDialogScreenWithGameBackground {
public:
GamePauseScreen(const Path &filename);
@ -67,7 +62,6 @@ private:
// hack
bool finishNextFrame_ = false;
DialogResult finishNextFrameResult_ = DR_CANCEL;
PauseScreenMode mode_ = PauseScreenMode::MAIN;
UI::Button *playButton_ = nullptr;
};

View File

@ -573,7 +573,7 @@ void StoreScreen::CreateViews() {
ProductItemView *StoreScreen::GetSelectedItem() {
for (int i = 0; i < scrollItemView_->GetNumSubviews(); ++i) {
ProductItemView *item = dynamic_cast<ProductItemView *>(scrollItemView_->GetViewByIndex(i));
ProductItemView *item = static_cast<ProductItemView *>(scrollItemView_->GetViewByIndex(i));
if (!item) {
continue;
}
@ -585,7 +585,7 @@ ProductItemView *StoreScreen::GetSelectedItem() {
}
UI::EventReturn StoreScreen::OnGameSelected(UI::EventParams &e) {
ProductItemView *item = dynamic_cast<ProductItemView *>(e.v);
ProductItemView *item = static_cast<ProductItemView *>(e.v);
if (!item)
return UI::EVENT_DONE;