Update to match coding standards

- Single letter for loop variable names
- Preface bool variables with is/has/should/can/want
This commit is contained in:
Mark Johnson 2016-03-16 15:15:42 -07:00
parent 6094613d06
commit 66f9effd12

View file

@ -198,17 +198,17 @@ void Stats::updateStats(bool force) {
STAT_UPDATE(downloadsPending, ResourceCache::getPendingRequestCount()); STAT_UPDATE(downloadsPending, ResourceCache::getPendingRequestCount());
// See if the active download urls have changed // See if the active download urls have changed
bool updateUrls = _downloads != _downloadUrls.size(); bool shouldUpdateUrls = _downloads != _downloadUrls.size();
if (!updateUrls) { if (!shouldUpdateUrls) {
for (int ii = 0; ii < _downloads; ii++) { for (int i = 0; i < _downloads; i++) {
if (loadingRequests[ii]->getURL().toString() != _downloadUrls[ii]) { if (loadingRequests[i]->getURL().toString() != _downloadUrls[i]) {
updateUrls = true; shouldUpdateUrls = true;
break; break;
} }
} }
} }
// If the urls have changed, update the list // If the urls have changed, update the list
if (updateUrls) { if (shouldUpdateUrls) {
_downloadUrls.clear(); _downloadUrls.clear();
foreach (Resource* resource, loadingRequests) { foreach (Resource* resource, loadingRequests) {
_downloadUrls << resource->getURL().toString(); _downloadUrls << resource->getURL().toString();