Skip to content

Commit

Permalink
Editor palettes: Remove an unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 22, 2017
1 parent a1c22e5 commit 2b7b1b3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/editor/palette/common_palette.hpp
Expand Up @@ -76,7 +76,6 @@ class common_palette : public gui::widget {

/** Menu expanding for palette group list */
virtual void expand_palette_groups_menu(std::vector<config>& items, int i) = 0;
virtual void expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& items, int i) = 0;

//item
virtual int num_items() = 0;
Expand Down
18 changes: 0 additions & 18 deletions src/editor/palette/editor_palettes.cpp
Expand Up @@ -98,24 +98,6 @@ template bool editor_palette<t_translation::terrain_code>::scroll_up();
template bool editor_palette<unit_type>::scroll_up();
template bool editor_palette<overlay>::scroll_up();

template<class Item>
void editor_palette<Item>::expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& items, int i)
{
const std::vector<item_group>& item_groups = get_groups();

for (size_t mci = 0; mci < item_groups.size(); ++mci) {
std::string groupname = item_groups[mci].name;
if (groupname.empty()) {
groupname = _("(Unknown Group)");
}
const std::string& img = item_groups[mci].icon;
items.push_back(std::pair<std::string, std::string>( img, groupname));
}
}
template void editor_palette<t_translation::terrain_code>::expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& items, int /*i*/);
template void editor_palette<unit_type>::expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& items, int /*i*/);
template void editor_palette<overlay>::expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& items, int /*i*/);

template<class Item>
bool editor_palette<Item>::can_scroll_up()
{
Expand Down
1 change: 0 additions & 1 deletion src/editor/palette/editor_palettes.hpp
Expand Up @@ -63,7 +63,6 @@ class editor_palette : public tristate_palette {
size_t start_num(void) override { return items_start_; }

/** Menu expanding for palette group list */
void expand_palette_groups_menu(std::vector< std::pair<std::string, std::string> >& items, int i) override;
void expand_palette_groups_menu(std::vector<config>& items, int i) override;

void set_group(size_t index) override;
Expand Down
1 change: 0 additions & 1 deletion src/editor/palette/empty_palette.hpp
Expand Up @@ -72,7 +72,6 @@ class empty_palette : public common_palette {
virtual const std::vector<item_group>& get_groups() const override { return empty_; }

/** Menu expanding for palette group list */
virtual void expand_palette_groups_menu(std::vector< std::pair< std::string, std::string> >& /*items*/,int) override {}
virtual void expand_palette_groups_menu(std::vector< config> & /*items*/,int) override {}

//item
Expand Down
1 change: 0 additions & 1 deletion src/editor/palette/location_palette.hpp
Expand Up @@ -42,7 +42,6 @@ class location_palette : public common_palette {
size_t start_num(void) override { return items_start_; }

/** Menu expanding for palette group list */
void expand_palette_groups_menu(std::vector<std::pair<std::string, std::string>>&,int) override {}
void expand_palette_groups_menu(std::vector<config>&,int) override {}

virtual void set_group(size_t /*index*/) override {}
Expand Down

0 comments on commit 2b7b1b3

Please sign in to comment.