[Archive] - Disabled copy constructor and assigment operator and removed not needed...
authorAndrzej Popowski <a.popowski@samsung.com>
Fri, 16 Oct 2015 12:03:57 +0000 (14:03 +0200)
committerAndrzej Popowski <a.popowski@samsung.com>
Fri, 16 Oct 2015 12:03:57 +0000 (14:03 +0200)
Change-Id: I76e92d6d59acb1d7ce39c3cb5fc47e0322914101
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/archive/archive_file.cc
src/archive/un_zip.cc
src/archive/un_zip_extract_request.h
src/archive/zip_add_request.h

index 68e772d090f85f8e2715adfd1d9de3e9fa5927cb..990d6c58b1f5be62e7f6eae7cdd39bce17103be9 100755 (executable)
@@ -312,7 +312,6 @@ PlatformResult ArchiveFile::extractAllTask(ExtractAllProgressCallback* callback)
         if(m_created_as_new_empty_archive) {
             //We do not call progress callback since we do not have any ArchiveFileEntry
             callback->callSuccessCallbackOnMainThread();
-            callback = NULL;
             return PlatformResult(ErrorCode::NO_ERROR);
         }
         else {
index b961e0e9e839d00a320d3fbb47265e82c8cee010..579958ed940858dc94721c7c3bd81562a0d995a2 100755 (executable)
@@ -222,7 +222,6 @@ PlatformResult UnZip::extractAllFilesTo(const std::string& extract_path,
     }
 
     callback->callSuccessCallbackOnMainThread();
-    callback = NULL;
 
     return PlatformResult(ErrorCode::NO_ERROR);
 }
@@ -307,7 +306,6 @@ PlatformResult UnZip::extractTo(ExtractEntryProgressCallback* callback)
 
     // after finish extracting success callback will be called
     callback->callSuccessCallbackOnMainThread();
-    callback = NULL;
 
     return PlatformResult(ErrorCode::NO_ERROR);
 }
index ee7fabb728dc385c76e4940f3883f74d43eeda29..04d7391d7ff9a27d77721a05f0488df86db070a1 100755 (executable)
@@ -45,6 +45,11 @@ private:
             const std::string& extract_path,
             const std::string& base_strip_path,
             BaseProgressCallback* callback);
+
+    //Not copyable, assignable
+    UnZipExtractRequest(UnZipExtractRequest const&) = delete;
+    UnZipExtractRequest& operator=(UnZipExtractRequest const&) = delete;
+
     PlatformResult run();
     PlatformResult getCurrentFileInfo();
     PlatformResult handleDirectoryEntry();
index ec9d08717674d10bfd9710f606a507e17e6eea51..49459d874fc5b73cc97f0e00a62c07937b96d3a9 100755 (executable)
@@ -42,6 +42,9 @@ public:
 
 private:
     ZipAddRequest(Zip& owner, AddProgressCallback*& callback);
+    ZipAddRequest(ZipAddRequest const&) = delete;
+    ZipAddRequest& operator=(ZipAddRequest const&) = delete;
+
     PlatformResult run();
 
     void addNodeAndSubdirsToList(filesystem::NodePtr src_node,