Fixed: Clang warnings

This commit is contained in:
kervala 2015-11-07 18:33:43 +01:00
parent 4a268da708
commit 0afd605acc
2 changed files with 8 additions and 4 deletions

View file

@ -2140,7 +2140,8 @@ namespace NLGUI
std::string typeName = "???"; std::string typeName = "???";
if (_ChildrenGroups[k]) if (_ChildrenGroups[k])
{ {
const type_info &ti = typeid(*_ChildrenGroups[k]); NLGUI::CInterfaceGroup *group = _ChildrenGroups[k];
const type_info &ti = typeid(*group);
typeName = ti.name(); typeName = ti.name();
} }
nlinfo("Group %d, name = %s, type=%s", k, _ChildrenGroups[k] ? _ChildrenGroups[k]->getId().c_str() : "???", typeName.c_str()); nlinfo("Group %d, name = %s, type=%s", k, _ChildrenGroups[k] ? _ChildrenGroups[k]->getId().c_str() : "???", typeName.c_str());
@ -2156,7 +2157,8 @@ namespace NLGUI
std::string typeName = "???"; std::string typeName = "???";
if (_ChildrenGroups[k]) if (_ChildrenGroups[k])
{ {
const type_info &ti = typeid(*_EltOrder[k]); NLGUI::CViewBase *view = _EltOrder[k];
const type_info &ti = typeid(*view);
typeName = ti.name(); typeName = ti.name();
} }
CInterfaceElement *el = _EltOrder[k]; CInterfaceElement *el = _EltOrder[k];

View file

@ -2488,7 +2488,8 @@ void CInterfaceManager::dumpUI(bool /* indent */)
if (ig->getViews()[k]) if (ig->getViews()[k])
{ {
info += id; info += id;
info += toString(", type = %s, address=0x%p", typeid(*ig->getViews()[k]).name(), ig->getViews()[k]); NLGUI::CViewBase *view = ig->getViews()[k];
info += toString(", type = %s, address=0x%p", typeid(*view).name(), view);
} }
else else
{ {
@ -2504,7 +2505,8 @@ void CInterfaceManager::dumpUI(bool /* indent */)
if (ig->getControls()[k]) if (ig->getControls()[k])
{ {
info += id; info += id;
info += toString(", type = %s, address=0x%p", typeid(*ig->getControls()[k]).name(), ig->getControls()[k]); NLGUI::CCtrlBase *control = ig->getControls()[k];
info += toString(", type = %s, address=0x%p", typeid(*control).name(), control);
} }
else else
{ {