diff --git a/src/curl.cpp b/src/curl.cpp index 80ab1d3..440e2cc 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -4003,7 +4003,7 @@ int S3fsCurl::PreMultipartPostRequest(const char* tpath, headers_t& meta, std::s return 0; } -int S3fsCurl::CompleteMultipartPostRequest(const char* tpath, const std::string& upload_id, etaglist_t& parts) +int S3fsCurl::CompleteMultipartPostRequest(const char* tpath, const std::string& upload_id, const etaglist_t& parts) { S3FS_PRN_INFO3("[tpath=%s][parts=%zu]", SAFESTRPTR(tpath), parts.size()); @@ -4014,7 +4014,7 @@ int S3fsCurl::CompleteMultipartPostRequest(const char* tpath, const std::string& // make contents std::string postContent; postContent += "\n"; - for(etaglist_t::iterator it = parts.begin(); it != parts.end(); ++it){ + for(auto it = parts.begin(); it != parts.end(); ++it){ if(it->etag.empty()){ S3FS_PRN_ERR("%d file part is not finished uploading.", it->part_num); return -EIO; diff --git a/src/curl.h b/src/curl.h index 6bdc1bb..df59b71 100644 --- a/src/curl.h +++ b/src/curl.h @@ -385,7 +385,7 @@ class S3fsCurl int CheckBucket(const char* check_path, bool compat_dir, bool force_no_sse); int ListBucketRequest(const char* tpath, const char* query); int PreMultipartPostRequest(const char* tpath, headers_t& meta, std::string& upload_id, bool is_copy); - int CompleteMultipartPostRequest(const char* tpath, const std::string& upload_id, etaglist_t& parts); + int CompleteMultipartPostRequest(const char* tpath, const std::string& upload_id, const etaglist_t& parts); int UploadMultipartPostRequest(const char* tpath, int part_num, const std::string& upload_id); bool MixMultipartPostComplete(); int MultipartListRequest(std::string& body); diff --git a/src/fdcache_fdinfo.cpp b/src/fdcache_fdinfo.cpp index 4229ffe..be5b1c2 100644 --- a/src/fdcache_fdinfo.cpp +++ b/src/fdcache_fdinfo.cpp @@ -697,7 +697,7 @@ bool PseudoFdInfo::CancelAllThreads() // [NOTE] // Maximum multipart upload size must be uploading boundary. // -bool PseudoFdInfo::ExtractUploadPartsFromUntreatedArea(const off_t& untreated_start, const off_t& untreated_size, mp_part_list_t& to_upload_list, filepart_list_t& cancel_upload_list, off_t max_mp_size) +bool PseudoFdInfo::ExtractUploadPartsFromUntreatedArea(off_t untreated_start, off_t untreated_size, mp_part_list_t& to_upload_list, filepart_list_t& cancel_upload_list, off_t max_mp_size) { if(untreated_start < 0 || untreated_size <= 0){ S3FS_PRN_ERR("Parameters are wrong(untreated_start=%lld, untreated_size=%lld).", static_cast(untreated_start), static_cast(untreated_size)); diff --git a/src/fdcache_fdinfo.h b/src/fdcache_fdinfo.h index efe2fbb..72d3f54 100644 --- a/src/fdcache_fdinfo.h +++ b/src/fdcache_fdinfo.h @@ -86,7 +86,7 @@ class PseudoFdInfo bool ParallelMultipartUpload(const char* path, const mp_part_list_t& mplist, bool is_copy); bool InsertUploadPart(off_t start, off_t size, int part_num, bool is_copy, etagpair** ppetag); bool CancelAllThreads(); - bool ExtractUploadPartsFromUntreatedArea(const off_t& untreated_start, const off_t& untreated_size, mp_part_list_t& to_upload_list, filepart_list_t& cancel_upload_list, off_t max_mp_size); + bool ExtractUploadPartsFromUntreatedArea(off_t untreated_start, off_t untreated_size, mp_part_list_t& to_upload_list, filepart_list_t& cancel_upload_list, off_t max_mp_size); bool IsUploadingHasLock() const REQUIRES(upload_list_lock); public: