[Nearby] Fix role init for BT profile
Due to some subtle C++ rules, BluetoothProfileManagerClient::Options' role field was not being initialized to the default value. This ended up working correctly most of the time by chance, but we have see the role of CLIENT go over d-bus when there is no reference to ever setting in the code. See this article for the subtle details: https://abseil.io/tips/146 Specifically section "A Digression Discerning Defaulted Default Constructor Declarations". Because the ctor was defined in the .cc file it is considered a "user-defined" ctor (even though it is defaulted) and thus scalar members are not explicitly initialized. Bug: b:173832484 Change-Id: Iaf518d903f219128e5832b2a793ce092b02733ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561261 Commit-Queue: James Vecore <vecore@google.com> Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org> Auto-Submit: James Vecore <vecore@google.com> Reviewed-by:Sonny Sasaka <sonnysasaka@chromium.org> Cr-Commit-Position: refs/heads/master@{#831107}
Showing
Please register or sign in to comment