MCPcopy Create free account
hub / github.com/dermesser/libsocket / highestfd

Function highestfd

C++/select.cpp:42–51  ·  view source on GitHub ↗

UTIL *****/ * @brief Utility function to find the highest number in a vector (typically, * the highest file descriptor) */

Source from the content-addressed store, hash-verified

40 * the highest file descriptor)
41 */
42int highestfd(const std::vector<int>& v) {
43 std::vector<int>::const_iterator end = v.end();
44 int highestfd = 0;
45
46 for (std::vector<int>::const_iterator cur = v.begin(); cur != end; cur++) {
47 if (*cur > highestfd) highestfd = *cur;
48 }
49
50 return highestfd;
51}
52
53} // namespace libsocket

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected