[build] remove use of <algorithm> in header

pull/824/merge
Timothy Stack 2 years ago
parent ef7c7fa9b4
commit 09bd5396b2

@ -31,6 +31,8 @@
* Dumping ground for useful functions with no other home.
*/
#include <algorithm>
#include "lnav_util.hh"
#include <stdio.h>
@ -137,6 +139,15 @@ write_line_to(FILE* outfile, const attr_line_t& al)
}
}
bool
pollfd_ready(const std::vector<struct pollfd>& pollfds, int fd, short events)
{
return std::any_of(
pollfds.begin(), pollfds.end(), [fd, events](const auto& entry) {
return entry.fd == fd && entry.revents & events;
});
}
namespace lnav {
std::string

@ -141,16 +141,9 @@ is_glob(const std::string& fn)
short pollfd_revents(const std::vector<struct pollfd>& pollfds, int fd);
inline bool
pollfd_ready(const std::vector<struct pollfd>& pollfds,
int fd,
short events = POLLIN | POLLHUP)
{
return std::any_of(
pollfds.begin(), pollfds.end(), [fd, events](const auto& entry) {
return entry.fd == fd && entry.revents & events;
});
};
bool pollfd_ready(const std::vector<struct pollfd>& pollfds,
int fd,
short events = POLLIN | POLLHUP);
inline void
rusagesub(const struct rusage& left,

Loading…
Cancel
Save