diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-08-03 13:56:33 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-08-04 02:36:58 -0400 |
| commit | 2665457f4ab3562525543f8e474bfb93ce3416ad (patch) | |
| tree | 16166950cebde8f7ac99d51a3bcdcfa2869cf627 /src/video_core/renderer_base.h | |
| parent | 6030c5ce412e44ddcfe0a31c6747a017166bf33d (diff) | |
renderer_base: Make Rasterizer() return the rasterizer by reference
All calling code assumes that the rasterizer will be in a valid state,
which is a totally fine assumption. The only way the rasterizer wouldn't
be is if initialization is done incorrectly or fails, which is checked
against in System::Init().
Diffstat (limited to 'src/video_core/renderer_base.h')
| -rw-r--r-- | src/video_core/renderer_base.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index effb9aed3..235de23a1 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -46,8 +46,12 @@ public: return m_current_frame; } - RasterizerInterface* Rasterizer() const { - return rasterizer.get(); + RasterizerInterface& Rasterizer() { + return *rasterizer; + } + + const RasterizerInterface& Rasterizer() const { + return *rasterizer; } void RefreshRasterizerSetting(); |
