From: Steve Brokenshire Date: Mon, 28 Dec 2015 02:03:54 +0000 (+0000) Subject: Replaced PREF code in EMAIL with ProcessIntegerValue. X-Git-Tag: release-0.09~199 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=5d6277a1b4af590329f694d988780704bfcf2d9a;p=xestiaab%2F.git Replaced PREF code in EMAIL with ProcessIntegerValue. --- diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index f842c04..607f28c 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -2183,23 +2183,7 @@ void ContactDataObject::ProcessEmail(wxString PropertySeg1, wxString PropertySeg } 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){ - - EmailListPref->erase(*EmailCount); - EmailListPref->insert(std::make_pair(*EmailCount, PriorityNumber)); - - } + ProcessIntegerValue(this, EmailListPref, &PropertyValue, EmailCount); } else {