From: Steve Brokenshire Date: Mon, 28 Dec 2015 02:17:08 +0000 (+0000) Subject: Replaced the PREF code in TITLE with ProcessIntegerValue. X-Git-Tag: release-0.09~193 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=7d729a4ae2a2f9255de6ea3babe3d5ee983fd1fd;p=xestiaab%2F.git Replaced the PREF code in TITLE with ProcessIntegerValue. --- diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index caf08ee..6247596 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -3417,25 +3417,9 @@ void ContactDataObject::ProcessTitle(wxString PropertySeg1, wxString PropertySeg TitleListPID->insert(std::make_pair(*TitleCount, PropertyValue)); } else if (PropertyName == wxT("PREF")){ - - int PriorityNumber = 0; - bool ValidNumber = TRUE; - - try{ - PriorityNumber = std::stoi(PropertyValue.ToStdString()); - } - - catch(std::invalid_argument &e){ - ValidNumber = FALSE; - } - - if (ValidNumber == TRUE){ - TitleListPref->erase(*TitleCount); - TitleListPref->insert(std::make_pair(*TitleCount, PriorityNumber)); - - } - + ProcessIntegerValue(this, TitleListPref, &PropertyValue, TitleCount); + } else if (PropertyName == wxT("LANGUAGE")){ TitleListLanguage->erase(*TitleCount);