summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/window.cpp
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2020-01-23 04:03:35 +0100
committer R. Belmont <rb6502@users.noreply.github.com>2020-01-22 22:03:35 -0500
commit7c3aea8928f90955b7b67e40c705c16d8543384f (patch)
tree4818711117f20ef52fbbcec6543aa970c3c4d519 /src/osd/windows/window.cpp
parentd4bed5fce44ecf903e5170a8d4624a9edf7c14f3 (diff)
fixed some clang-tidy warnings (nw) (#6197)
* fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
Diffstat (limited to 'src/osd/windows/window.cpp')
-rw-r--r--src/osd/windows/window.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index 3794e79cd14..ce63d28eba6 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -204,7 +204,7 @@ bool windows_osd_interface::window_init()
void windows_osd_interface::update_slider_list()
{
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
// check if any window has dirty sliders
if (window->has_renderer() && window->renderer().sliders_dirty())
@@ -224,7 +224,7 @@ void windows_osd_interface::build_slider_list()
{
m_sliders.clear();
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
if (window->has_renderer())
{
@@ -418,7 +418,7 @@ void winwindow_process_events_periodic(running_machine &machine)
static bool is_mame_window(HWND hwnd)
{
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
if (std::static_pointer_cast<win_window_info>(window)->platform_window() == hwnd)
return true;
@@ -582,7 +582,7 @@ void winwindow_take_snap(void)
assert(GetCurrentThreadId() == main_threadid);
// iterate over windows and request a snap
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
window->renderer().save();
}
@@ -600,7 +600,7 @@ void winwindow_toggle_fsfx(void)
assert(GetCurrentThreadId() == main_threadid);
// iterate over windows and request a snap
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
window->renderer().toggle_fsfx();
}
@@ -618,7 +618,7 @@ void winwindow_take_video(void)
assert(GetCurrentThreadId() == main_threadid);
// iterate over windows and request a snap
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
window->renderer().record();
}
@@ -636,7 +636,7 @@ void winwindow_toggle_full_screen(void)
assert(GetCurrentThreadId() == main_threadid);
// if we are in debug mode, never go full screen
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
if (window->machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)
return;
@@ -644,7 +644,7 @@ void winwindow_toggle_full_screen(void)
video_config.windowed = !video_config.windowed;
// iterate over windows and toggle their fullscreen state
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
SendMessage(std::static_pointer_cast<win_window_info>(window)->platform_window(), WM_USER_SET_FULLSCREEN, !video_config.windowed, 0);
// Set the first window as foreground
@@ -661,7 +661,7 @@ void winwindow_toggle_full_screen(void)
bool winwindow_has_focus(void)
{
// see if one of the video windows has focus
- for (auto window : osd_common_t::s_window_list)
+ for (const auto &window : osd_common_t::s_window_list)
{
switch (std::static_pointer_cast<win_window_info>(window)->focus())
{
@@ -752,7 +752,7 @@ void win_window_info::create(running_machine &machine, int index, std::shared_pt
// set main window
if (window->m_index > 0)
{
- for (auto w : osd_common_t::s_window_list)
+ for (const auto &w : osd_common_t::s_window_list)
{
if (w->m_index == 0)
{
@@ -769,7 +769,7 @@ void win_window_info::create(running_machine &machine, int index, std::shared_pt
// see if we are safe for fullscreen
window->m_fullscreen_safe = TRUE;
- for (auto win : osd_common_t::s_window_list)
+ for (const auto &win : osd_common_t::s_window_list)
if (win->monitor() == monitor.get())
window->m_fullscreen_safe = FALSE;