I guess doing `std::min<size_t>(m_keyboards.size(), max_connect);` would be cleaner but I did it using a c-style cast myself a few times, so I'm kind of sitting in a glass house here.