From 95ae99c18ec1b5523b6586bf3e360b6bb2a0bfce Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 01:52:11 +0000 Subject: [PATCH] Replaced code from PREF in MEMBER with ProcessIntegerValue. --- source/contacteditor/ContactDataObject.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index 12486bc..1f2ee93 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -769,23 +769,7 @@ void ContactDataObject::ProcessMember(wxString PropertySeg1, wxString PropertySe } 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){ - - GroupsListPref.erase(*GroupCount); - GroupsListPref.insert(std::make_pair(*GroupCount, PriorityNumber)); - - } + ProcessIntegerValue(this, &GroupsListPref, &PropertyValue, GroupCount); } else if (PropertyName == wxT("MEDIATYPE")){ -- 2.39.5