From cccf4ec6bbbc80aaf383dbe9b88fc91671bdbaf5 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 05:30:29 +0000 Subject: [PATCH] Replaced token processing in REV with ProcessTokens. --- source/contacteditor/ContactDataObject.cpp | 19 +++++-------------- source/contacteditor/ContactDataObject.h | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index ddb6a57..44a361d 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -511,17 +511,8 @@ void ContactDataObject::ProcessRevision(wxString PropertySeg1, wxString Property } CaptureString(&PropertyValue, FALSE); - - if (FirstToken == TRUE){ - - PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue); - FirstToken = FALSE; - - } else { - - PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue); - - } + + ProcessTokens(&PropertyName, &PropertyValue, &PropertyTokens, &FirstToken); } @@ -5161,14 +5152,14 @@ void ContactDataObject::ProcessVendor(wxString PropertySeg1, wxString PropertySe void ProcessTokens(wxString *PropertyName, wxString *PropertyValue, wxString *PropertyTokens, - bool FirstToken){ + bool *FirstToken){ if (!PropertyName->IsEmpty() && !PropertyValue->IsEmpty() && *PropertyName != wxT("TYPE")){ - if (FirstToken == TRUE){ + if (*FirstToken == TRUE){ PropertyTokens->Append(*PropertyName + wxT("=") + *PropertyValue); - FirstToken = FALSE; + *FirstToken = FALSE; } else { diff --git a/source/contacteditor/ContactDataObject.h b/source/contacteditor/ContactDataObject.h index f542a06..06a6f93 100644 --- a/source/contacteditor/ContactDataObject.h +++ b/source/contacteditor/ContactDataObject.h @@ -621,7 +621,7 @@ void CheckType(wxString *PropertySeg1, void ProcessTokens(wxString *PropertyName, wxString *PropertyValue, wxString *PropertyTokens, - bool FirstToken); + bool *FirstToken); void ProcessIntegerValue(wxString *PropertyName, wxString PropertyNameMatch, -- 2.39.5