diff options
| author | 2019-01-17 11:19:44 -0500 | |
|---|---|---|
| committer | 2019-01-17 11:19:52 -0500 | |
| commit | a661025637f301013d9da781e67334853162c6b3 (patch) | |
| tree | 5ff229c5ba29aef84c1e87f940952704aeae05b7 /src/core/core.cpp | |
| parent | yuzu/web_browser: std::move std::function instances in OpenPage() (diff) | |
| download | yuzu-a661025637f301013d9da781e67334853162c6b3.tar.gz yuzu-a661025637f301013d9da781e67334853162c6b3.tar.xz yuzu-a661025637f301013d9da781e67334853162c6b3.zip | |
core/frontend/applets/web_browser: Make OpenPage() non-const
This is a function that definitely doesn't always have a non-modifying
behavior across all implementations, so this should be made non-const.
This gets rid of the need to mark data members as mutable to work around
the fact mutating data members needs to occur.
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 31c590866..572814e4b 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -443,27 +443,31 @@ std::shared_ptr<FileSys::VfsFilesystem> System::GetFilesystem() const { | |||
| 443 | return impl->virtual_filesystem; | 443 | return impl->virtual_filesystem; |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | void System::SetProfileSelector(std::unique_ptr<Core::Frontend::ProfileSelectApplet> applet) { | 446 | void System::SetProfileSelector(std::unique_ptr<Frontend::ProfileSelectApplet> applet) { |
| 447 | impl->profile_selector = std::move(applet); | 447 | impl->profile_selector = std::move(applet); |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | const Core::Frontend::ProfileSelectApplet& System::GetProfileSelector() const { | 450 | const Frontend::ProfileSelectApplet& System::GetProfileSelector() const { |
| 451 | return *impl->profile_selector; | 451 | return *impl->profile_selector; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | void System::SetSoftwareKeyboard(std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet> applet) { | 454 | void System::SetSoftwareKeyboard(std::unique_ptr<Frontend::SoftwareKeyboardApplet> applet) { |
| 455 | impl->software_keyboard = std::move(applet); | 455 | impl->software_keyboard = std::move(applet); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | const Core::Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() const { | 458 | const Frontend::SoftwareKeyboardApplet& System::GetSoftwareKeyboard() const { |
| 459 | return *impl->software_keyboard; | 459 | return *impl->software_keyboard; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | void System::SetWebBrowser(std::unique_ptr<Core::Frontend::WebBrowserApplet> applet) { | 462 | void System::SetWebBrowser(std::unique_ptr<Frontend::WebBrowserApplet> applet) { |
| 463 | impl->web_browser = std::move(applet); | 463 | impl->web_browser = std::move(applet); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | const Core::Frontend::WebBrowserApplet& System::GetWebBrowser() const { | 466 | Frontend::WebBrowserApplet& System::GetWebBrowser() { |
| 467 | return *impl->web_browser; | ||
| 468 | } | ||
| 469 | |||
| 470 | const Frontend::WebBrowserApplet& System::GetWebBrowser() const { | ||
| 467 | return *impl->web_browser; | 471 | return *impl->web_browser; |
| 468 | } | 472 | } |
| 469 | 473 | ||