diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-02-27 08:54:40 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-02-27 08:54:42 -0500 |
| commit | 4596a529ed0bdaeba853527fe408af5c8cfe1a32 (patch) | |
| tree | 93541f8d13c43c641fe802c53ae8d4d8787cd51c /src/core/frontend/emu_window.cpp | |
| parent | a96ed06efa571a3dec67623803e45579c74dc6b1 (diff) | |
core/frontend/emu_window: Make ClipToTouchScreen a const member function
This member function doesn't modify instance state, so it can have the
const specifier applied to it.
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
| -rw-r--r-- | src/core/frontend/emu_window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index 9dd493efbb..e29afd630c 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -67,7 +67,7 @@ static bool IsWithinTouchscreen(const Layout::FramebufferLayout& layout, unsigne framebuffer_x >= layout.screen.left && framebuffer_x < layout.screen.right); } -std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) { +std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) const { new_x = std::max(new_x, framebuffer_layout.screen.left); new_x = std::min(new_x, framebuffer_layout.screen.right - 1); |
