Remove CliOpenFile argument from CliDelegate::loadPalette()

It wasn't used.
This commit is contained in:
David Capello 2022-12-23 12:07:04 -03:00
parent 768773bb3a
commit 5309991d0d
6 changed files with 9 additions and 17 deletions

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2019 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2016-2018 David Capello
//
// This program is distributed under the terms of
@ -30,7 +30,7 @@ namespace app {
virtual void beforeOpenFile(const CliOpenFile& cof) { }
virtual void afterOpenFile(const CliOpenFile& cof) { }
virtual void saveFile(Context* ctx, const CliOpenFile& cof) { }
virtual void loadPalette(Context* ctx, const CliOpenFile& cof, const std::string& filename) { }
virtual void loadPalette(Context* ctx, const std::string& filename) { }
virtual void exportFiles(Context* ctx, DocExporter& exporter) { }
#ifdef ENABLE_SCRIPTING
virtual int execScript(const std::string& filename,

View File

@ -437,7 +437,7 @@ int CliProcessor::process(Context* ctx)
ASSERT(cof.document == lastDoc);
std::string filename = value.value();
m_delegate->loadPalette(ctx, cof, filename);
m_delegate->loadPalette(ctx, filename);
}
else {
console.printf("You need to load a document to change its palette with --palette\n");

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2020 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2016-2018 David Capello
//
// This program is distributed under the terms of
@ -103,7 +103,6 @@ void DefaultCliDelegate::saveFile(Context* ctx, const CliOpenFile& cof)
}
void DefaultCliDelegate::loadPalette(Context* ctx,
const CliOpenFile& cof,
const std::string& filename)
{
std::unique_ptr<doc::Palette> palette(load_palette(filename.c_str()));

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2019 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2016-2018 David Capello
//
// This program is distributed under the terms of
@ -19,7 +19,7 @@ namespace app {
void showVersion() override;
void afterOpenFile(const CliOpenFile& cof) override;
void saveFile(Context* ctx, const CliOpenFile& cof) override;
void loadPalette(Context* ctx, const CliOpenFile& cof, const std::string& filename) override;
void loadPalette(Context* ctx, const std::string& filename) override;
void exportFiles(Context* ctx, DocExporter& exporter) override;
#ifdef ENABLE_SCRIPTING
int execScript(const std::string& filename,

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2020 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2016-2018 David Capello
//
// This program is distributed under the terms of
@ -167,14 +167,9 @@ void PreviewCliDelegate::saveFile(Context* ctx, const CliOpenFile& cof)
}
void PreviewCliDelegate::loadPalette(Context* ctx,
const CliOpenFile& cof,
const std::string& filename)
{
ASSERT(cof.document);
ASSERT(cof.document->sprite());
std::cout << "- Load palette:\n"
<< " - Sprite: '" << cof.filename << "'\n"
<< " - Palette: '" << filename << "'\n";
}

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2019 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
// Copyright (C) 2016-2018 David Capello
//
// This program is distributed under the terms of
@ -29,9 +29,7 @@ namespace app {
void beforeOpenFile(const CliOpenFile& cof) override;
void afterOpenFile(const CliOpenFile& cof) override;
void saveFile(Context* ctx, const CliOpenFile& cof) override;
void loadPalette(Context* ctx,
const CliOpenFile& cof,
const std::string& filename) override;
void loadPalette(Context* ctx, const std::string& filename) override;
void exportFiles(Context* ctx, DocExporter& exporter) override;
#ifdef ENABLE_SCRIPTING
int execScript(const std::string& filename,