[gjs] coverage: Don't construct a new array for no good reason
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] coverage: Don't construct a new array for no good reason
- Date: Mon, 3 Feb 2014 21:45:17 +0000 (UTC)
commit 46341730574ab0d39babc3e535ae9ed592248a95
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 3 14:44:03 2014 -0500
coverage: Don't construct a new array for no good reason
modules/coverage.js | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/modules/coverage.js b/modules/coverage.js
index 845a9e5..3f2fe41 100644
--- a/modules/coverage.js
+++ b/modules/coverage.js
@@ -648,7 +648,7 @@ function _convertFunctionCountersToArray(functionCounters) {
}
function CoverageStatisticsContainer(files) {
- let pendingFiles = [];
+ let pendingFiles = files;
let coveredFiles = {};
function ensureStatisticsFor(filename) {
@@ -663,9 +663,6 @@ function CoverageStatisticsContainer(files) {
throw new Error('Not tracking statistics for ' + filename);
return statistics;
};
-
- for (let file of files)
- pendingFiles.push(file);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]