mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Initialize BooleanMediumSelector
Prevents using uninitalized, random, values. PiperOrigin-RevId: 561128853
This commit is contained in:
committed by
Copybara-Service
parent
263b1b4e85
commit
b50d130ca4
@@ -15,6 +15,7 @@
|
||||
#define CORE_MEDIUM_SELECTOR_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "proto/connections_enums.pb.h"
|
||||
|
||||
namespace nearby {
|
||||
@@ -23,12 +24,12 @@ namespace connections {
|
||||
using Medium = ::location::nearby::proto::connections::Medium;
|
||||
|
||||
struct BooleanMediumSelector {
|
||||
bool bluetooth;
|
||||
bool ble;
|
||||
bool web_rtc;
|
||||
bool wifi_lan;
|
||||
bool wifi_hotspot;
|
||||
bool wifi_direct;
|
||||
bool bluetooth = false;
|
||||
bool ble = false;
|
||||
bool web_rtc = false;
|
||||
bool wifi_lan = false;
|
||||
bool wifi_hotspot = false;
|
||||
bool wifi_direct = false;
|
||||
|
||||
constexpr bool Any(bool value) const {
|
||||
return bluetooth == value || ble == value || web_rtc == value ||
|
||||
|
||||
Reference in New Issue
Block a user