[FTBFS] [PATCH] SVN 5179 gcc error

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

[FTBFS] [PATCH] SVN 5179 gcc error

#1 Post by spikethehobbit » Tue Aug 28, 2012 3:53 am

gcc does not like 'typename' outside of a template declaration

This patch reverts 2nd half of 5179

@@ -201,17 +201,17 @@ UI/ObjectListWnd.cpp:
EnumRow(enumT value, GG::Y row_height) :
GG::ListBox::Row(GG::X1, row_height, "EnumRow"),
m_value(value)
{
SetChildClippingMode(ClipToClient);
- const std::string& label = UserString(GG::GetEnumMap<typename enumT>().FromEnum(m_value));
+ const std::string& label = UserString(GG::GetEnumMap<enumT>().FromEnum(m_value));
push_back(new GG::TextControl(GG::X0, GG::Y0, UserString(label), ClientUI::GetFont(),
ClientUI::TextColor(), GG::FORMAT_LEFT | GG::FORMAT_VCENTER));
}
- typename enumT GetValue() const { return m_value; }
+ enumT GetValue() const { return m_value; }
private:
- typename enumT m_value;
+ enumT m_value;
};

void Init(const Condition::ConditionBase* init_condition) {
// fill droplist with basic types of conditions and select appropriate row
const GG::Y DROPLIST_HEIGHT(ClientUI::Pts() + 4);
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

Post Reply