Add const modifier to doc::sort_palette() args

This commit is contained in:
David Capello 2017-06-02 09:59:31 -03:00
parent 2c02e67ebc
commit 144139f49d
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2001-2015 David Capello
// Copyright (c) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -121,7 +121,9 @@ struct PalEntryWithIndexPredicate {
} // anonymous namespace
Remap sort_palette(Palette* palette, SortPaletteBy channel, bool ascending)
Remap sort_palette(const Palette* palette,
const SortPaletteBy channel,
const bool ascending)
{
std::vector<PalEntryWithIndex> tmp(palette->size());
for (int i=0; i<palette->size(); ++i) {

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2001-2015 David Capello
// Copyright (c) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -26,7 +26,9 @@ namespace doc {
};
// Creates a Remap to sort the palette. It doesn't apply the remap.
Remap sort_palette(Palette* palette, SortPaletteBy channel, bool ascending);
Remap sort_palette(const Palette* palette,
const SortPaletteBy channel,
const bool ascending);
} // namespace doc