libbinder: Prettier initializer for bitset field
Bug: 185909244
Test: TH
Change-Id: I549f64de25911cafc618921875c68b643a847605
diff --git a/libs/binder/include/binder/RpcServer.h b/libs/binder/include/binder/RpcServer.h
index a5bb871..7fea76e 100644
--- a/libs/binder/include/binder/RpcServer.h
+++ b/libs/binder/include/binder/RpcServer.h
@@ -203,8 +203,8 @@
size_t mMaxThreads = 1;
std::optional<uint32_t> mProtocolVersion;
// A mode is supported if the N'th bit is on, where N is the mode enum's value.
- std::bitset<8> mSupportedFileDescriptorTransportModes =
- (1 << static_cast<unsigned long>(RpcSession::FileDescriptorTransportMode::NONE));
+ std::bitset<8> mSupportedFileDescriptorTransportModes = std::bitset<8>().set(
+ static_cast<size_t>(RpcSession::FileDescriptorTransportMode::NONE));
base::unique_fd mServer; // socket we are accepting sessions on
std::mutex mLock; // for below