htcs: fix magic template argument deduction, do Close/Connect/Bind

This commit is contained in:
Michael Scire authored and SciresM committed 2021-02-24 04:06:54 -08:00
1 parent f71943c03a
commit 0c791f2279
8 files changed
+135 -23

No files matched your search

@@ -20,4 +20,17 @@ namespace ams::htcs::impl {
s32 ConvertResultToErrorCode(const Result result);
constexpr bool IsValidName(const char *name) {
static_assert(PeerNameBufferLength == PortNameBufferLength);
return util::Strnlen(name, PeerNameBufferLength) < PeerNameBufferLength;
}
constexpr bool IsValidName(const HtcsPeerName &name) {
return IsValidName(name.name);
}
constexpr bool IsValidName(const HtcsPortName &name) {
return IsValidName(name.name);
}
}