Remove unnecessary copy constructors and operator= (#2468)

This commit is contained in:
Andrew Gaul 2024-06-10 23:37:53 +09:00 committed by GitHub
parent ebae5a302f
commit 683452a9be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 18 additions and 0 deletions

View File

@ -104,6 +104,10 @@ class StatCache
private: private:
StatCache(); StatCache();
~StatCache(); ~StatCache();
StatCache(const StatCache&) = delete;
StatCache(StatCache&&) = delete;
StatCache& operator=(const StatCache&) = delete;
StatCache& operator=(StatCache&&) = delete;
void Clear(); void Clear();
bool GetStat(const std::string& key, struct stat* pst, headers_t* meta, bool overcheck, const char* petag, bool* pisforce); bool GetStat(const std::string& key, struct stat* pst, headers_t* meta, bool overcheck, const char* petag, bool* pisforce);

View File

@ -65,6 +65,10 @@ class S3fsMultiCurl
public: public:
explicit S3fsMultiCurl(int maxParallelism, bool not_abort = false); explicit S3fsMultiCurl(int maxParallelism, bool not_abort = false);
~S3fsMultiCurl(); ~S3fsMultiCurl();
S3fsMultiCurl(const S3fsMultiCurl&) = delete;
S3fsMultiCurl(S3fsMultiCurl&&) = delete;
S3fsMultiCurl& operator=(const S3fsMultiCurl&) = delete;
S3fsMultiCurl& operator=(S3fsMultiCurl&&) = delete;
int GetMaxParallelism() const { return maxParallelism; } int GetMaxParallelism() const { return maxParallelism; }

View File

@ -58,6 +58,10 @@ class FdManager
public: public:
FdManager(); FdManager();
~FdManager(); ~FdManager();
FdManager(const FdManager&) = delete;
FdManager(FdManager&&) = delete;
FdManager& operator=(const FdManager&) = delete;
FdManager& operator=(FdManager&&) = delete;
// Reference singleton // Reference singleton
static FdManager* get() { return &singleton; } static FdManager* get() { return &singleton; }

View File

@ -99,7 +99,9 @@ class PageList
explicit PageList(off_t size = 0, bool is_loaded = false, bool is_modified = false, bool shrinked = false); explicit PageList(off_t size = 0, bool is_loaded = false, bool is_modified = false, bool shrinked = false);
PageList(const PageList&) = delete; PageList(const PageList&) = delete;
PageList(PageList&&) = delete;
PageList& operator=(const PageList&) = delete; PageList& operator=(const PageList&) = delete;
PageList& operator=(PageList&&) = delete;
~PageList(); ~PageList();
bool Init(off_t size, bool is_loaded, bool is_modified); bool Init(off_t size, bool is_loaded, bool is_modified);

View File

@ -46,6 +46,10 @@ class CacheFileStat
explicit CacheFileStat(const char* tpath = nullptr); explicit CacheFileStat(const char* tpath = nullptr);
~CacheFileStat(); ~CacheFileStat();
CacheFileStat(const CacheFileStat&) = delete;
CacheFileStat(CacheFileStat&&) = delete;
CacheFileStat& operator=(const CacheFileStat&) = delete;
CacheFileStat& operator=(CacheFileStat&&) = delete;
bool Open(); bool Open();
bool ReadOnlyOpen(); bool ReadOnlyOpen();