Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIutil.cpp
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | PSRETURN GUI<T>::GetSettingPointer(const IGUIObject* pObject, const CStr& Setting, T*& Value) | ||||
ENSURE(pObject != NULL); | ENSURE(pObject != NULL); | ||||
std::map<CStr, SGUISetting>::const_iterator it = pObject->m_Settings.find(Setting); | std::map<CStr, SGUISetting>::const_iterator it = pObject->m_Settings.find(Setting); | ||||
if (it == pObject->m_Settings.end()) | if (it == pObject->m_Settings.end()) | ||||
{ | { | ||||
LOGWARNING("setting %s was not found on object %s", | LOGWARNING("setting %s was not found on object %s", | ||||
Setting.c_str(), | Setting.c_str(), | ||||
pObject->GetPresentableName().c_str()); | pObject->GetPresentableName().c_str()); | ||||
throw; | |||||
return PSRETURN_GUI_InvalidSetting; | return PSRETURN_GUI_InvalidSetting; | ||||
wraitii: ? | |||||
} | } | ||||
if (it->second.m_pSetting == NULL) | if (it->second.m_pSetting == NULL) | ||||
return PSRETURN_GUI_InvalidSetting; | return PSRETURN_GUI_InvalidSetting; | ||||
#ifndef NDEBUG | #ifndef NDEBUG | ||||
CheckType<T>(pObject, Setting); | CheckType<T>(pObject, Setting); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
ENSURE(pObject != NULL); | ENSURE(pObject != NULL); | ||||
if (!pObject->SettingExists(Setting)) | if (!pObject->SettingExists(Setting)) | ||||
{ | { | ||||
LOGWARNING("setting %s was not found on object %s", | LOGWARNING("setting %s was not found on object %s", | ||||
Setting.c_str(), | Setting.c_str(), | ||||
pObject->GetPresentableName().c_str()); | pObject->GetPresentableName().c_str()); | ||||
throw; | |||||
return PSRETURN_GUI_InvalidSetting; | return PSRETURN_GUI_InvalidSetting; | ||||
} | } | ||||
#ifndef NDEBUG | #ifndef NDEBUG | ||||
CheckType<T>(pObject, Setting); | CheckType<T>(pObject, Setting); | ||||
#endif | #endif | ||||
valueSet(); | valueSet(); | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
?