lib/alsa/NonBlock: fix lambda indent

This commit is contained in:
Max Kellermann 2024-07-11 21:11:32 +02:00
parent 9aa6b03ba8
commit 9704cf3dcb
2 changed files with 13 additions and 16 deletions

View File

@ -42,13 +42,13 @@ AlsaNonBlockPcm::DispatchSockets(MultiSocketMonitor &m,
auto *i = pfds; auto *i = pfds;
m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){ m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){
if (i >= end) if (i >= end)
return; return;
i->fd = s.Get(); i->fd = s.Get();
i->events = i->revents = events; i->events = i->revents = events;
++i; ++i;
}); });
unsigned short dummy; unsigned short dummy;
int err = snd_pcm_poll_descriptors_revents(pcm, pfds, i - pfds, &dummy); int err = snd_pcm_poll_descriptors_revents(pcm, pfds, i - pfds, &dummy);
@ -87,13 +87,13 @@ AlsaNonBlockMixer::DispatchSockets(MultiSocketMonitor &m,
auto *i = pfds; auto *i = pfds;
m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){ m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){
if (i >= end) if (i >= end)
return; return;
i->fd = s.Get(); i->fd = s.Get();
i->events = i->revents = events; i->events = i->revents = events;
++i; ++i;
}); });
unsigned short dummy; unsigned short dummy;
snd_mixer_poll_descriptors_revents(mixer, pfds, i - pfds, &dummy); snd_mixer_poll_descriptors_revents(mixer, pfds, i - pfds, &dummy);

View File

@ -1,8 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project // Copyright The Music Player Daemon Project
#ifndef MPD_ALSA_NON_BLOCK_HXX #pragma once
#define MPD_ALSA_NON_BLOCK_HXX
#include "event/Chrono.hxx" #include "event/Chrono.hxx"
#include "util/ReusableArray.hxx" #include "util/ReusableArray.hxx"
@ -51,5 +50,3 @@ public:
*/ */
void DispatchSockets(MultiSocketMonitor &m, snd_mixer_t *mixer) noexcept; void DispatchSockets(MultiSocketMonitor &m, snd_mixer_t *mixer) noexcept;
}; };
#endif