Przeglądaj źródła

fix "(performance) Possible inefficient checking for 'R' emptiness."

David Kalnischkies 14 lat temu
rodzic
commit
b4a6673c48
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      methods/http.cc

+ 1 - 1
methods/http.cc

@@ -1327,7 +1327,7 @@ int HttpMethod::Loop()
                after the same URI is seen twice in a queue item. */
                after the same URI is seen twice in a queue item. */
             StringVector &R = Redirected[Queue->DestFile];
             StringVector &R = Redirected[Queue->DestFile];
             bool StopRedirects = false;
             bool StopRedirects = false;
-            if (R.size() == 0)
+            if (R.empty() == true)
                R.push_back(Queue->Uri);
                R.push_back(Queue->Uri);
             else if (R[0] == "STOP" || R.size() > 10)
             else if (R[0] == "STOP" || R.size() > 10)
                StopRedirects = true;
                StopRedirects = true;