Menu

Commit [r545]  Maximize  Restore  History

Follow-up to r542:

Only use the include list if it is not empty.

tortoisesvn 2010-10-03

changed /trunk/src/HiddenWindow.cpp
/trunk/src/HiddenWindow.cpp Diff Switch to side-by-side view
--- a/trunk/src/HiddenWindow.cpp
+++ b/trunk/src/HiddenWindow.cpp
@@ -744,22 +744,25 @@
                                 wstring author1 = logit->second.author;
                                 std::transform(author1.begin(), author1.end(), author1.begin(), std::tolower);
 
-                                wstring s1 = writeIt->second.includeUsers;
-                                std::transform(s1.begin(), s1.end(), s1.begin(), std::tolower);
-                                CAppUtils::SearchReplace(s1, _T("\r\n"), _T("\n"));
-                                vector<wstring> includeVector = CAppUtils::tokenize_str(s1, _T("\n"));
-                                bool bInclude = false;
-                                for (vector<wstring>::iterator it = includeVector.begin(); it != includeVector.end(); ++it)
+                                if (writeIt->second.includeUsers.size() > 0)
                                 {
-                                    if (author1.compare(*it) == 0)
+                                    wstring s1 = writeIt->second.includeUsers;
+                                    std::transform(s1.begin(), s1.end(), s1.begin(), std::tolower);
+                                    CAppUtils::SearchReplace(s1, _T("\r\n"), _T("\n"));
+                                    vector<wstring> includeVector = CAppUtils::tokenize_str(s1, _T("\n"));
+                                    bool bInclude = false;
+                                    for (vector<wstring>::iterator it = includeVector.begin(); it != includeVector.end(); ++it)
                                     {
-                                        bInclude = true;
-                                        break;
+                                        if (author1.compare(*it) == 0)
+                                        {
+                                            bInclude = true;
+                                            break;
+                                        }
                                     }
+                                    bIgnore = !bInclude;
                                 }
-                                bIgnore = !bInclude;
-
-                                s1 = writeIt->second.ignoreUsers;
+
+                                wstring s1 = writeIt->second.ignoreUsers;
                                 std::transform(s1.begin(), s1.end(), s1.begin(), std::tolower);
                                 CAppUtils::SearchReplace(s1, _T("\r\n"), _T("\n"));
                                 vector<wstring> ignoreVector = CAppUtils::tokenize_str(s1, _T("\n"));
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.