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;
m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){
if (i >= end)
return;
if (i >= end)
return;
i->fd = s.Get();
i->events = i->revents = events;
++i;
});
i->fd = s.Get();
i->events = i->revents = events;
++i;
});
unsigned short dummy;
int err = snd_pcm_poll_descriptors_revents(pcm, pfds, i - pfds, &dummy);
@ -87,13 +87,13 @@ AlsaNonBlockMixer::DispatchSockets(MultiSocketMonitor &m,
auto *i = pfds;
m.ForEachReturnedEvent([&i, end](SocketDescriptor s, unsigned events){
if (i >= end)
return;
if (i >= end)
return;
i->fd = s.Get();
i->events = i->revents = events;
++i;
});
i->fd = s.Get();
i->events = i->revents = events;
++i;
});
unsigned short 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
// Copyright The Music Player Daemon Project
#ifndef MPD_ALSA_NON_BLOCK_HXX
#define MPD_ALSA_NON_BLOCK_HXX
#pragma once
#include "event/Chrono.hxx"
#include "util/ReusableArray.hxx"
@ -51,5 +50,3 @@ public:
*/
void DispatchSockets(MultiSocketMonitor &m, snd_mixer_t *mixer) noexcept;
};
#endif