Merge pull request #222 from andrewgaul/explicit

Annotate constructors as explicit
This commit is contained in:
Takeshi Nakatani 2015-08-12 23:42:03 +09:00
commit 2482aada43
4 changed files with 6 additions and 6 deletions

View File

@ -90,7 +90,7 @@ typedef struct xattr_value{
unsigned char* pvalue; unsigned char* pvalue;
size_t length; size_t length;
xattr_value(unsigned char* pval = NULL, size_t len = 0) : pvalue(pval), length(len) {} explicit xattr_value(unsigned char* pval = NULL, size_t len = 0) : pvalue(pval), length(len) {}
~xattr_value() ~xattr_value()
{ {
if(pvalue){ if(pvalue){

View File

@ -211,7 +211,7 @@ class S3fsCurl
public: public:
// constructor/destructor // constructor/destructor
S3fsCurl(bool ahbe = false); explicit S3fsCurl(bool ahbe = false);
~S3fsCurl(); ~S3fsCurl();
private: private:

View File

@ -35,7 +35,7 @@ class CacheFileStat
public: public:
static bool DeleteCacheFileStat(const char* path); static bool DeleteCacheFileStat(const char* path);
CacheFileStat(const char* tpath = NULL); explicit CacheFileStat(const char* tpath = NULL);
~CacheFileStat(); ~CacheFileStat();
bool Open(void); bool Open(void);
@ -76,7 +76,7 @@ class PageList
public: public:
static void FreeList(fdpage_list_t& list); static void FreeList(fdpage_list_t& list);
PageList(off_t size = 0, bool is_init = false); explicit PageList(off_t size = 0, bool is_init = false);
~PageList(); ~PageList();
off_t Size(void) const; off_t Size(void) const;
@ -112,7 +112,7 @@ class FdEntity
bool SetAllStatus(bool is_enable); bool SetAllStatus(bool is_enable);
public: public:
FdEntity(const char* tpath = NULL, const char* cpath = NULL); explicit FdEntity(const char* tpath = NULL, const char* cpath = NULL);
~FdEntity(); ~FdEntity();
void Close(void); void Close(void);

View File

@ -91,7 +91,7 @@ class AutoLock
bool is_locked; bool is_locked;
public: public:
AutoLock(pthread_mutex_t* pmutex = NULL); explicit AutoLock(pthread_mutex_t* pmutex = NULL);
~AutoLock(); ~AutoLock();
bool Lock(void); bool Lock(void);