Merge "Fix google-explicit-constructor warnings."
am: 9f0aab88a8
* commit '9f0aab88a881303be9babb273063a9ad6a1ee643':
Fix google-explicit-constructor warnings.
Change-Id: Ie99b349b2337ade9815616ec46a6c3bb377b992c
This commit is contained in:
commit
00975937b4
12 changed files with 17 additions and 17 deletions
|
@ -59,7 +59,7 @@ struct ifaddrs_storage {
|
|||
sockaddr_storage ifa_ifu;
|
||||
char name[IFNAMSIZ + 1];
|
||||
|
||||
ifaddrs_storage(ifaddrs** list) {
|
||||
explicit ifaddrs_storage(ifaddrs** list) {
|
||||
memset(this, 0, sizeof(*this));
|
||||
|
||||
// push_front onto `list`.
|
||||
|
|
|
@ -107,7 +107,7 @@ struct BufferOutputStream {
|
|||
|
||||
struct FdOutputStream {
|
||||
public:
|
||||
FdOutputStream(int fd) : total(0), fd_(fd) {
|
||||
explicit FdOutputStream(int fd) : total(0), fd_(fd) {
|
||||
}
|
||||
|
||||
void Send(const char* data, int len) {
|
||||
|
|
|
@ -44,10 +44,10 @@ static bool __bionic_current_locale_is_utf8 = true;
|
|||
struct __locale_t {
|
||||
size_t mb_cur_max;
|
||||
|
||||
__locale_t(size_t mb_cur_max) : mb_cur_max(mb_cur_max) {
|
||||
explicit __locale_t(size_t mb_cur_max) : mb_cur_max(mb_cur_max) {
|
||||
}
|
||||
|
||||
__locale_t(const __locale_t* other) {
|
||||
explicit __locale_t(const __locale_t* other) {
|
||||
if (other == LC_GLOBAL_LOCALE) {
|
||||
mb_cur_max = __bionic_current_locale_is_utf8 ? 4 : 1;
|
||||
} else {
|
||||
|
|
|
@ -77,7 +77,7 @@ struct if_list {
|
|||
if_list* next;
|
||||
struct if_nameindex data;
|
||||
|
||||
if_list(if_list** list) {
|
||||
explicit if_list(if_list** list) {
|
||||
// push_front onto `list`.
|
||||
next = *list;
|
||||
*list = this;
|
||||
|
|
|
@ -192,7 +192,7 @@ struct find_nth_cookie {
|
|||
const uint32_t n;
|
||||
const prop_info *pi;
|
||||
|
||||
find_nth_cookie(uint32_t n) : count(0), n(n), pi(NULL) {
|
||||
explicit find_nth_cookie(uint32_t n) : count(0), n(n), pi(NULL) {
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ struct Feature {
|
|||
|
||||
class PropertyParser {
|
||||
public:
|
||||
PropertyParser(const char* property) : cur_(property) {}
|
||||
explicit PropertyParser(const char* property) : cur_(property) {}
|
||||
|
||||
bool Get(std::string* property, size_t* value, bool* value_set);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ static struct glue* lastglue = &__sglue;
|
|||
|
||||
class ScopedFileLock {
|
||||
public:
|
||||
ScopedFileLock(FILE* fp) : fp_(fp) {
|
||||
explicit ScopedFileLock(FILE* fp) : fp_(fp) {
|
||||
FLOCKFILE(fp_);
|
||||
}
|
||||
~ScopedFileLock() {
|
||||
|
|
|
@ -926,7 +926,7 @@ class RwlockKindTestHelper {
|
|||
pthread_rwlock_t lock;
|
||||
|
||||
public:
|
||||
RwlockKindTestHelper(int kind_type) {
|
||||
explicit RwlockKindTestHelper(int kind_type) {
|
||||
InitRwlock(kind_type);
|
||||
}
|
||||
|
||||
|
@ -1539,7 +1539,7 @@ TEST(pthread, pthread_mutexattr_gettype) {
|
|||
struct PthreadMutex {
|
||||
pthread_mutex_t lock;
|
||||
|
||||
PthreadMutex(int mutex_type) {
|
||||
explicit PthreadMutex(int mutex_type) {
|
||||
init(mutex_type);
|
||||
}
|
||||
|
||||
|
@ -1640,7 +1640,7 @@ class MutexWakeupHelper {
|
|||
}
|
||||
|
||||
public:
|
||||
MutexWakeupHelper(int mutex_type) : m(mutex_type) {
|
||||
explicit MutexWakeupHelper(int mutex_type) : m(mutex_type) {
|
||||
}
|
||||
|
||||
void test() {
|
||||
|
|
|
@ -49,7 +49,7 @@ TEST(search, lfind_lsearch) {
|
|||
}
|
||||
|
||||
struct node {
|
||||
node(const char* s) : s(strdup(s)) {}
|
||||
explicit node(const char* s) : s(strdup(s)) {}
|
||||
|
||||
char* s;
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ TEST(search, tfind_tsearch_twalk_tdestroy) {
|
|||
}
|
||||
|
||||
struct pod_node {
|
||||
pod_node(int i) : i(i) {}
|
||||
explicit pod_node(int i) : i(i) {}
|
||||
int i;
|
||||
};
|
||||
|
||||
|
@ -136,7 +136,7 @@ TEST(search, tdelete) {
|
|||
}
|
||||
|
||||
struct q_node {
|
||||
q_node(int i) : i(i) {}
|
||||
explicit q_node(int i) : i(i) {}
|
||||
|
||||
q_node* next;
|
||||
q_node* prev;
|
||||
|
|
|
@ -163,7 +163,7 @@ TEST(STRING_TEST, strsignal_concurrent) {
|
|||
template<class Character>
|
||||
class StringTestState {
|
||||
public:
|
||||
StringTestState(size_t MAX_LEN) : MAX_LEN(MAX_LEN), align1_index_(0), align2_index_(0) {
|
||||
explicit StringTestState(size_t MAX_LEN) : MAX_LEN(MAX_LEN), align1_index_(0), align2_index_(0) {
|
||||
int max_alignment = 64;
|
||||
|
||||
// TODO: fix the tests to not sometimes use twice their specified "MAX_LEN".
|
||||
|
|
|
@ -59,7 +59,7 @@ static void __attribute__((noreturn)) fork_child(unsigned cpu, T &data) {
|
|||
|
||||
class ChildGuard {
|
||||
public:
|
||||
ChildGuard(pid_t pid) : pid(pid) {}
|
||||
explicit ChildGuard(pid_t pid) : pid(pid) {}
|
||||
|
||||
~ChildGuard() {
|
||||
kill(pid, SIGKILL);
|
||||
|
|
|
@ -273,7 +273,7 @@ struct Counter {
|
|||
}
|
||||
|
||||
public:
|
||||
Counter(void (*fn)(sigval_t)) : value(0), timer_valid(false) {
|
||||
explicit Counter(void (*fn)(sigval_t)) : value(0), timer_valid(false) {
|
||||
memset(&se, 0, sizeof(se));
|
||||
se.sigev_notify = SIGEV_THREAD;
|
||||
se.sigev_notify_function = fn;
|
||||
|
|
Loading…
Reference in a new issue