Fix google-explicit-constructor warnings.
Bug: 28341362 Change-Id: I4504e98a8db31e0edcbe63c23f9af43eb13e9d86
This commit is contained in:
parent
3abd03232e
commit
1c563d96f0
11 changed files with 12 additions and 12 deletions
|
@ -55,7 +55,7 @@ struct PollNode {
|
|||
fdevent* fde;
|
||||
adb_pollfd pollfd;
|
||||
|
||||
PollNode(fdevent* fde) : fde(fde) {
|
||||
explicit PollNode(fdevent* fde) : fde(fde) {
|
||||
memset(&pollfd, 0, sizeof(pollfd));
|
||||
pollfd.fd = fde->fd;
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ ssize_t UdpSocket::Receive(void* data, size_t length, int timeout_ms) {
|
|||
// Implements the Socket interface for TCP.
|
||||
class TcpSocket : public Socket {
|
||||
public:
|
||||
TcpSocket(cutils_socket_t sock) : Socket(sock) {}
|
||||
explicit TcpSocket(cutils_socket_t sock) : Socket(sock) {}
|
||||
|
||||
bool Send(const void* data, size_t length) override;
|
||||
bool Send(std::vector<cutils_socket_buffer_t> buffers) override;
|
||||
|
|
|
@ -66,7 +66,7 @@ class TcpTransport : public Transport {
|
|||
int Close() override;
|
||||
|
||||
private:
|
||||
TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::move(sock)) {}
|
||||
explicit TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::move(sock)) {}
|
||||
|
||||
// Connects to the device and performs the initial handshake. Returns false and fills |error|
|
||||
// on failure.
|
||||
|
|
|
@ -111,7 +111,7 @@ class UdpTransport : public Transport {
|
|||
int Close() override;
|
||||
|
||||
private:
|
||||
UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {}
|
||||
explicit UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {}
|
||||
|
||||
// Performs the UDP initialization procedure. Returns true on success.
|
||||
bool InitializeProtocol(std::string* error);
|
||||
|
|
|
@ -89,7 +89,7 @@ struct usb_handle
|
|||
|
||||
class LinuxUsbTransport : public Transport {
|
||||
public:
|
||||
LinuxUsbTransport(std::unique_ptr<usb_handle> handle) : handle_(std::move(handle)) {}
|
||||
explicit LinuxUsbTransport(std::unique_ptr<usb_handle> handle) : handle_(std::move(handle)) {}
|
||||
~LinuxUsbTransport() override = default;
|
||||
|
||||
ssize_t Read(void* data, size_t len) override;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace android {
|
|||
class BpFingerprintDaemonCallback : public BpInterface<IFingerprintDaemonCallback>
|
||||
{
|
||||
public:
|
||||
BpFingerprintDaemonCallback(const sp<IBinder>& impl) :
|
||||
explicit BpFingerprintDaemonCallback(const sp<IBinder>& impl) :
|
||||
BpInterface<IFingerprintDaemonCallback>(impl) {
|
||||
}
|
||||
virtual status_t onEnrollResult(int64_t devId, int32_t fpId, int32_t gpId, int32_t rem) {
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace android {
|
|||
class BpUserManager : public BpInterface<IUserManager>
|
||||
{
|
||||
public:
|
||||
BpUserManager(const sp<IBinder>& impl) :
|
||||
explicit BpUserManager(const sp<IBinder>& impl) :
|
||||
BpInterface<IUserManager>(impl) {
|
||||
}
|
||||
virtual int32_t getCredentialOwnerProfile(int32_t user_id) {
|
||||
|
|
|
@ -264,7 +264,7 @@ void Action::DumpState() const {
|
|||
|
||||
class EventTrigger : public Trigger {
|
||||
public:
|
||||
EventTrigger(const std::string& trigger) : trigger_(trigger) {
|
||||
explicit EventTrigger(const std::string& trigger) : trigger_(trigger) {
|
||||
}
|
||||
bool CheckTriggers(const Action& action) const override {
|
||||
return action.CheckEventTrigger(trigger_);
|
||||
|
@ -288,7 +288,7 @@ private:
|
|||
|
||||
class BuiltinTrigger : public Trigger {
|
||||
public:
|
||||
BuiltinTrigger(Action* action) : action_(action) {
|
||||
explicit BuiltinTrigger(Action* action) : action_(action) {
|
||||
}
|
||||
bool CheckTriggers(const Action& action) const override {
|
||||
return action_ == &action;
|
||||
|
|
|
@ -665,7 +665,7 @@ static bool IsValidApkPath(const std::string& apk_path) {
|
|||
|
||||
class ScopedZiparchiveHandle {
|
||||
public:
|
||||
ScopedZiparchiveHandle(ZipArchiveHandle handle) : handle_(handle) {
|
||||
explicit ScopedZiparchiveHandle(ZipArchiveHandle handle) : handle_(handle) {
|
||||
}
|
||||
|
||||
~ScopedZiparchiveHandle() {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
class Stack {
|
||||
public:
|
||||
Stack(size_t size) : size_(size) {
|
||||
explicit Stack(size_t size) : size_(size) {
|
||||
int prot = PROT_READ | PROT_WRITE;
|
||||
int flags = MAP_PRIVATE | MAP_ANONYMOUS;
|
||||
page_size_ = sysconf(_SC_PAGE_SIZE);
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
|
||||
#if !DEBUG_REFS
|
||||
|
||||
weakref_impl(RefBase* base)
|
||||
explicit weakref_impl(RefBase* base)
|
||||
: mStrong(INITIAL_STRONG_VALUE)
|
||||
, mWeak(0)
|
||||
, mBase(base)
|
||||
|
|
Loading…
Reference in a new issue