Fix google-explicit-constructor warnings in shill.
Bug: 28341362
Change-Id: I7fbe21e702b88ca1a78c55674719caefb80a1ac6
Test: build with clang-tidy
diff --git a/dbus/chromeos_dbus_control.h b/dbus/chromeos_dbus_control.h
index b05b6ee..3c0880d 100644
--- a/dbus/chromeos_dbus_control.h
+++ b/dbus/chromeos_dbus_control.h
@@ -31,7 +31,7 @@
class ChromeosDBusControl : public ControlInterface {
public:
- ChromeosDBusControl(EventDispatcher* dispatcher);
+ explicit ChromeosDBusControl(EventDispatcher* dispatcher);
~ChromeosDBusControl() override;
void RegisterManagerObject(
diff --git a/dns_server_proxy.h b/dns_server_proxy.h
index 1c143fb..876aa18 100644
--- a/dns_server_proxy.h
+++ b/dns_server_proxy.h
@@ -31,7 +31,7 @@
// Proxy is setup using dnsmasq.
class DNSServerProxy {
public:
- DNSServerProxy(const std::vector<std::string>& dns_servers);
+ explicit DNSServerProxy(const std::vector<std::string>& dns_servers);
virtual ~DNSServerProxy();
// Start dnsmasq process for serving local DNS requests.
diff --git a/test-rpc-proxy/proxy_dbus_client.h b/test-rpc-proxy/proxy_dbus_client.h
index 2fe33bc..905ff65 100644
--- a/test-rpc-proxy/proxy_dbus_client.h
+++ b/test-rpc-proxy/proxy_dbus_client.h
@@ -53,7 +53,7 @@
static const char kDbusErrorObjectUnknown[];
static const int kLogLevel;
- ProxyDbusClient(scoped_refptr<dbus::Bus> bus);
+ explicit ProxyDbusClient(scoped_refptr<dbus::Bus> bus);
void SetLogging(Technology tech);
std::vector<std::unique_ptr<DeviceProxy>> GetDeviceProxies();
std::vector<std::unique_ptr<ServiceProxy>> GetServiceProxies();
diff --git a/test-rpc-proxy/proxy_dbus_shill_wifi_client.h b/test-rpc-proxy/proxy_dbus_shill_wifi_client.h
index cdd6ddc..d122cd4 100644
--- a/test-rpc-proxy/proxy_dbus_shill_wifi_client.h
+++ b/test-rpc-proxy/proxy_dbus_shill_wifi_client.h
@@ -24,7 +24,7 @@
// Client.
class ProxyDbusShillWifiClient : public ProxyShillWifiClient {
public:
- ProxyDbusShillWifiClient(scoped_refptr<dbus::Bus> dbus_bus);
+ explicit ProxyDbusShillWifiClient(scoped_refptr<dbus::Bus> dbus_bus);
~ProxyDbusShillWifiClient() override = default;
bool SetLogging() override;
bool RemoveAllWifiEntries() override;
diff --git a/test-rpc-proxy/proxy_rpc_in_data_types.h b/test-rpc-proxy/proxy_rpc_in_data_types.h
index 8eb3055..5d451bd 100644
--- a/test-rpc-proxy/proxy_rpc_in_data_types.h
+++ b/test-rpc-proxy/proxy_rpc_in_data_types.h
@@ -32,7 +32,7 @@
static const int kDefaultSignalThreshold;
static const char kDefaultScanMethod[];
- BgscanConfiguration(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit BgscanConfiguration(XmlRpc::XmlRpcValue* xml_rpc_value_in);
std::string interface_;
int signal_threshold_;
@@ -48,7 +48,7 @@
static const int kDefaultAssociationTimeoutSeconds;
static const int kDefaultConfigurationTimeoutSeconds;
- AssociationParameters(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit AssociationParameters(XmlRpc::XmlRpcValue* xml_rpc_value_in);
std::string ssid_;
int discovery_timeout_seconds_;
@@ -72,7 +72,7 @@
// consumers of this interface look up the service by GUID.
class ConfigureServiceParameters {
public:
- ConfigureServiceParameters(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit ConfigureServiceParameters(XmlRpc::XmlRpcValue* xml_rpc_value_in);
std::string guid_;
std::string passphrase_;
diff --git a/test-rpc-proxy/proxy_rpc_security_types.h b/test-rpc-proxy/proxy_rpc_security_types.h
index d9e599d..4b3b103 100644
--- a/test-rpc-proxy/proxy_rpc_security_types.h
+++ b/test-rpc-proxy/proxy_rpc_security_types.h
@@ -47,7 +47,7 @@
// object from the incoming RPC data.
static std::unique_ptr<SecurityConfig> CreateSecurityConfigObject(
XmlRpc::XmlRpcValue* xml_rpc_value_in);
- SecurityConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit SecurityConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
virtual ~SecurityConfig() = default;
virtual void GetServiceProperties(brillo::VariantDictionary* properties);
@@ -59,7 +59,7 @@
// and simply start using the WEP keys after association finishes.
class WEPConfig : public SecurityConfig {
public:
- WEPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit WEPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
virtual void GetServiceProperties(brillo::VariantDictionary* properties) override;
private:
@@ -71,7 +71,7 @@
// Abstracts security configuration for a WPA encrypted WiFi network.
class WPAConfig : public SecurityConfig {
public:
- WPAConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit WPAConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
void GetServiceProperties(brillo::VariantDictionary* properties) override;
static const int kMaxPskSize;
@@ -94,7 +94,7 @@
static const char kDefaultEAPIdentity[];
static int last_tmp_id;
- EAPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit EAPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
void GetServiceProperties(brillo::VariantDictionary* properties) override;
private:
@@ -126,7 +126,7 @@
public:
static const int kDefaultKeyPeriod;
- DynamicWEPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit DynamicWEPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
void GetServiceProperties(brillo::VariantDictionary* properties) override;
private:
@@ -137,7 +137,7 @@
// Security type to set up a WPA connection via EAP-TLS negotiation.
class WPAEAPConfig : public EAPConfig {
public:
- WPAEAPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit WPAEAPConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
void GetServiceProperties(brillo::VariantDictionary* properties) override;
private:
@@ -163,7 +163,7 @@
static const char kLayer2TypeTTLSMSCHAP[];
static const char kLayer2TypeTTLSPAP[];
- Tunneled1xConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
+ explicit Tunneled1xConfig(XmlRpc::XmlRpcValue* xml_rpc_value_in);
void GetServiceProperties(brillo::VariantDictionary* properties) override;
private: