From 7d729a4ae2a2f9255de6ea3babe3d5ee983fd1fd Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 02:17:08 +0000 Subject: [PATCH] Replaced the PREF code in TITLE with ProcessIntegerValue. --- source/contacteditor/ContactDataObject.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) 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); -- 2.39.2