From f5bce17e7b8f45d1c40243d0e2ea3ee55ae340c7 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 21 Apr 2022 12:23:36 -0300 Subject: [PATCH] Delete unused code in FileOp and FileFormat --- src/app/file/file.cpp | 5 +---- src/app/file/file_format.cpp | 6 +----- src/app/file/file_format.h | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/file/file.cpp b/src/app/file/file.cpp index cace709c4..7baf57582 100644 --- a/src/app/file/file.cpp +++ b/src/app/file/file.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2018-2021 Igara Studio S.A. +// Copyright (C) 2018-2022 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -884,9 +884,6 @@ void FileOp::stop() FileOp::~FileOp() { - if (m_format) - m_format->destroyData(this); - delete m_seq.palette; } diff --git a/src/app/file/file_format.cpp b/src/app/file/file_format.cpp index 3ab5b8b40..eed1c31b9 100644 --- a/src/app/file/file_format.cpp +++ b/src/app/file/file_format.cpp @@ -1,4 +1,5 @@ // Aseprite +// Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -57,9 +58,4 @@ bool FileFormat::postLoad(FileOp* fop) return onPostLoad(fop); } -void FileFormat::destroyData(FileOp* fop) -{ - onDestroyData(fop); -} - } // namespace app diff --git a/src/app/file/file_format.h b/src/app/file/file_format.h index 60ae1fd98..0346a5007 100644 --- a/src/app/file/file_format.h +++ b/src/app/file/file_format.h @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2019 Igara Studio S.A. +// Copyright (C) 2019-2022 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -61,9 +61,6 @@ namespace app { // Returns false cancelled the operation. bool postLoad(FileOp* fop); - // Destroys the custom data stored in "fop->format_data" field. - void destroyData(FileOp* fop); - // Returns extra options for this format. It can return != NULL // only if flags() returns FILE_SUPPORT_GET_FORMAT_OPTIONS. FormatOptionsPtr askUserForFormatOptions(FileOp* fop) { @@ -86,7 +83,6 @@ namespace app { #ifdef ENABLE_SAVE virtual bool onSave(FileOp* fop) = 0; #endif - virtual void onDestroyData(FileOp* fop) { } virtual FormatOptionsPtr onAskUserForFormatOptions(FileOp* fop) { return FormatOptionsPtr(nullptr);