template<typename W>
W &get_widget(const std::string &n) const
{
- std::map<std::string, Widget *>::const_iterator i=widgets.find(n);
+ std::map<std::string, Widget *>::const_iterator i = widgets.find(n);
if(i==widgets.end())
throw KeyError("Unknown widget", n);
- W *w=dynamic_cast<W *>(i->second);
+ W *w = dynamic_cast<W *>(i->second);
if(!w)
throw Exception("Widget type mismatch");
template<typename W>
void get_widget(const std::string &n, W *&w) const
{
- w=&get_widget<W>(n);
+ w = &get_widget<W>(n);
}
};