Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed unused variables from the contact loading subroutine for frmContactEditor.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 2 Aug 2015 14:03:39 +0000 (15:03 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 2 Aug 2015 14:03:39 +0000 (15:03 +0100)
source/contacteditor/frmContactEditor-Load.cpp

index 183e632..9333df7 100644 (file)
@@ -80,7 +80,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
        wxString wxSPropertySeg1;
        wxString wxSPropertySeg2;
        wxString wxSPropertyNextLine;
-       int ContactLineLen = 0;
+       size_t ContactLineLen = 0;
        int QuoteBreakPoint = 0;
        int FNCount = 0;
        int NameCount = 0;
@@ -199,8 +199,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                // Add the data into the contact editor depending on what it is.                                
                
                if (wxSProperty == wxT("KIND") && KindProcessed == FALSE){
-               
-                       int intPropertyLen = wxSPropertySeg1.Len();
+
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -208,14 +207,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
-                       int intPrevValue = 6;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
                
                        if (wxSPropertySeg2 == wxT("individual")){
                        
@@ -246,7 +237,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("MEMBER")){
 
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -254,14 +244,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
-                       int intPrevValue = 8;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
                
                        // Go through the list of contacts for the account and find the matching UID.
                        // If contact with UID doesn't match then say (unknown contact).
@@ -278,7 +260,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        //vCardNames = new std::map<wxString, wxString, std::greater<wxString>>;
                        std::multimap<wxString, wxString, std::greater<wxString>> vCardNamesAsc;
                        std::multimap<wxString, wxString, std::less<wxString>> vCardNamesDsc;
-                       int ContactIndex = 0;
     
                        wxDir vcardaccdir(AccountDirFinal);
     
@@ -441,7 +422,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        */
                        
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -449,14 +430,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 4;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
                        
@@ -712,7 +691,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("N") && NameProcessed == FALSE){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -720,13 +699,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 3;
-                       int intPref = 0;                        
-                       int intType = 0;
                        int intSplitSeek = 0;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -897,7 +873,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("NICKNAME")){
                        
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -905,14 +880,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 10;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -1002,7 +973,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -1135,7 +1106,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("GENDER") && GenderProcessed == FALSE){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -1143,14 +1113,8 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;;
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
                        int intPrevValue = 8;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
                
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
                        
@@ -1171,7 +1135,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -1262,7 +1226,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
 
                        // Process date. Preserve the remainder in the string.
                                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -1270,15 +1233,8 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool BirthdayText = FALSE;
-                       bool FirstToken = TRUE;                         
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
                        int intPrevValue = 6;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
                
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
                
@@ -1331,7 +1287,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                                ProcessCaptureStrings(&PropertyValue);
                        
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                        
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                
@@ -1411,7 +1367,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        // Process date. Preserve the remainder in the string.
                                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -1419,15 +1374,8 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool AnniversaryText = FALSE;
-                       bool FirstToken = TRUE;                         
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
                        int intPrevValue = 13;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
                
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
                
@@ -1478,7 +1426,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                                // Process properties.
                        
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                        
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                
@@ -1554,7 +1502,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("TZ")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -1562,14 +1510,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 4;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -1657,7 +1603,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                intPrevValue = intiter->second;
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -1834,7 +1780,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("ADR")){
                        
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -1859,14 +1805,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString AddressRegion;
                        wxString AddressPostalCode;
                        wxString AddressCountry;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 5;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -2272,7 +2216,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("EMAIL")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;
@@ -2298,15 +2242,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString AddressRegion;
                        wxString AddressPostalCode;
                        wxString AddressCountry;
-                       bool AfterFirstProperty = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitSeek = 0;
+                       bool FirstToken = TRUE;
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 7;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitPoint = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -2521,7 +2462,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("IMPP")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;
@@ -2532,15 +2473,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyTokens;
                        wxString IMPPType;
                        wxString IMPPAddress;
-                       bool AfterFirstProperty = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitSeek = 0;
+                       bool FirstToken = TRUE;
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 6;
                        int intPref = 0;
                        int intType = 0;
-                       int intSplitPoint = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -2847,7 +2785,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                        // Check TEL and make sure it is functioning properly.
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int> TypeSplitPoints;
@@ -2864,9 +2802,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString TelNumber;
                        wxString TelTypeUI;
                        wxString TelTypeDetail;
-                       bool AfterFirstProperty = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitSeek = 0;
+                       bool FirstToken = TRUE;
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 5;
@@ -2901,7 +2837,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                        // Strip out the quotes if they are there.
                                
-                                       int intPropertyValueLen = PropertyValue.Len();                          
+                                       size_t intPropertyValueLen = PropertyValue.Len();
                                
                                        if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -3071,7 +3007,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                intPrevValue = intiter->second;
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -3264,7 +3200,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("LANG")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -3272,14 +3207,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 6;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -3366,7 +3297,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -3495,7 +3426,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("GEO")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -3504,15 +3435,13 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyValue;
                        wxString PropertyTokens;
                        wxString GeoType;
-                       wxString GeoData;                       
-                       bool AfterFirstToken = FALSE;
+                       wxString GeoData;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 5;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -3599,7 +3528,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -3842,7 +3771,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("RELATED")){
                        
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -3852,15 +3781,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyTokens;
                        wxString RelatedType;
                        wxString RelatedTypeOriginal;                   
-                       wxString RelatedName;           
-                       bool AfterFirstToken = FALSE;
+                       wxString RelatedName;
                        bool FirstToken = TRUE;                 
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 9;
-                       int intPref = 0;                        
-                       int intType = 0;
-                       int intSplitSeek = 0;
+                       int intPref = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -3995,7 +3921,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -4107,7 +4033,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("URL")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -4115,14 +4040,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 5;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4209,7 +4130,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -4344,7 +4265,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                
                } else if (wxSProperty == wxT("TITLE")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -4352,14 +4272,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 7;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4449,7 +4365,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -4584,7 +4500,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("ROLE")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -4592,14 +4507,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 6;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4689,7 +4600,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -4824,7 +4735,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("ORG")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -4832,14 +4742,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 5;
                        int intPref = 0;
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -4932,7 +4838,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -5072,8 +4978,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        intValueSeek++;
                        
                } else if (wxSProperty == wxT("NOTE")) {
-               
-                       int intPropertyLen = wxSPropertySeg1.Len();
+
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -5081,15 +4986,11 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 6;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
-                       long ListCtrlIndex;
+            long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
                        
@@ -5178,7 +5079,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -5324,7 +5225,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("CATEGORIES")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -5409,7 +5310,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -5579,7 +5480,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("PHOTO")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -5593,7 +5494,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        int intPrevValue = 7;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -5664,7 +5564,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -5772,7 +5672,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString wxSPhotoData;
                        std::string base64enc;
                        
-                       if (intSplitsFound = 0){
+                       if (intSplitsFound == 0){
                        
                        } else {
                        
@@ -5851,7 +5751,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("LOGO")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -5865,7 +5765,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        int intPrevValue = 6;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -5936,7 +5835,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -6018,7 +5917,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        ProcessCaptureStrings(&wxSPropertySeg2);
                        
-                       if (intSplitsFound = 0){
+                       if (intSplitsFound == 0){
                        
                        } else {
                        
@@ -6097,7 +5996,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                } else if (wxSProperty == wxT("SOUND")) {
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -6111,7 +6010,6 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        int intPrevValue = 7;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -6182,7 +6080,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -6290,7 +6188,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString wxSSoundData;
                        std::string base64enc;
                        
-                       if (intSplitsFound = 0){
+                       if (intSplitsFound == 0){
                        
                        } else {
                        
@@ -6368,8 +6266,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        intValueSeek++;
                        
                } else if (wxSProperty == wxT("CALURI")){
-               
-                       int intPropertyLen = wxSPropertySeg1.Len();
+
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -6377,14 +6274,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 8;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -6451,7 +6344,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -6553,8 +6446,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        intValueSeek++;
                
                } else if (wxSProperty == wxT("CALADRURI")){
-               
-                       int intPropertyLen = wxSPropertySeg1.Len();
+
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -6562,14 +6454,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 11;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -6638,7 +6526,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -6740,8 +6628,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        intValueSeek++;
                
                } else if (wxSProperty == wxT("FBURL")){
-               
-                       int intPropertyLen = wxSPropertySeg1.Len();
+
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -6749,14 +6636,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
-                       bool FirstToken = TRUE;                 
-                       int intSplitsFound = 0;
-                       int intSplitSize = 0;
+                       bool FirstToken = TRUE;
                        int intPrevValue = 7;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -6823,7 +6706,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -6925,7 +6808,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        intValueSeek++;
                } else if (wxSProperty == wxT("KEY")){
                
-                       int intPropertyLen = wxSPropertySeg1.Len();
+                       size_t intPropertyLen = wxSPropertySeg1.Len();
                        std::map<int, int> SplitPoints;
                        std::map<int, int> SplitLength;
                        std::map<int, int>::iterator SLiter;                    
@@ -6933,14 +6816,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString PropertyName;
                        wxString PropertyValue;
                        wxString PropertyTokens;
-                       bool AfterFirstToken = FALSE;
                        bool FirstToken = TRUE;
                        int intSplitsFound = 0;
                        int intSplitSize = 0;
                        int intPrevValue = 5;
                        int intPref = 0;                        
                        int intType = 0;
-                       int intSplitSeek = 0;
                        long ListCtrlIndex;
                        
                        SplitValues(&wxSPropertySeg1, &SplitPoints, &SplitLength, intPrevValue);
@@ -7010,7 +6891,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                                
                                // Process properties.
                                
-                               int intPropertyValueLen = PropertyValue.Len();                          
+                               size_t intPropertyValueLen = PropertyValue.Len();
                                
                                if (PropertyValue.Mid((intPropertyValueLen - 1), 1) == wxT("\"")){
                                        
@@ -7102,7 +6983,7 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        wxString wxSKeyData;
                        std::string base64enc;
                        
-                       if (intSplitsFound = 0){
+                       if (intSplitsFound == 0){
                        
                        } else {
                        
@@ -7187,20 +7068,12 @@ bool frmContactEditor::LoadContact(wxString Filename){
 
                        KeyListDataType.insert(std::make_pair(intValueSeek, wxSKeyMIME));
                                
-                       if (intType = 0){
-                       
-                               KeyListType.insert(std::make_pair(intValueSeek, wxT("")));
-                       
-                       } else if (intType = 1){
-                       
-                               KeyListType.insert(std::make_pair(intValueSeek, wxT("home")));
-                       
-                       } else if (intType = 2){
-                       
-                               KeyListType.insert(std::make_pair(intValueSeek, wxT("work")));
-                       
-                       }
-                       
+            switch (intType){
+                case 0: KeyListType.insert(std::make_pair(intValueSeek, wxT("")));
+                case 1: KeyListType.insert(std::make_pair(intValueSeek, wxT("home")));
+                case 2: KeyListType.insert(std::make_pair(intValueSeek, wxT("work")));
+            }
+            
                        KeyListTokens.insert(std::make_pair(intValueSeek, PropertyTokens));
                        
                        KeyCount++;
@@ -7309,7 +7182,7 @@ void frmContactEditor::SplitValues(wxString *PropertyLine,
        std::map<int,int> *SplitLength, 
        int intSize){
        
-       int intPropertyLen = PropertyLine->Len();               
+       size_t intPropertyLen = PropertyLine->Len();
        int intSplitsFound = 0;
        int intSplitSize = 0;
        int intSplitSeek = 0;
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy