[Code Style] Rename shadowing variables

This commit is contained in:
Victor Woeltjen
2016-05-20 11:39:49 -07:00
parent e468080373
commit ad5691142e
56 changed files with 256 additions and 262 deletions

View File

@@ -93,11 +93,11 @@ define(
// Look up an object in the queue that does not have a value
// assigned to this key (or, add a new one)
function getFreeObject(key) {
var index = counts[key] || 0, object;
function getFreeObject(k) {
var index = counts[k] || 0, object;
// Track the largest free position for this key
counts[key] = index + 1;
counts[k] = index + 1;
// If it's before the end of the queue, add it there
if (index < queue.length) {

View File

@@ -84,8 +84,8 @@ define(
// Look up domain objects which have telemetry capabilities.
// This will either be the object in view, or object that
// this object delegates its telemetry capability to.
function promiseRelevantObjects(domainObject) {
return delegator.promiseTelemetryObjects(domainObject);
function promiseRelevantObjects(domainObj) {
return delegator.promiseTelemetryObjects(domainObj);
}
function updateValuesFromPool() {
@@ -114,16 +114,16 @@ define(
// Look up metadata associated with an object's telemetry
function lookupMetadata(domainObject) {
function lookupMetadata(domainObj) {
var telemetryCapability =
domainObject.getCapability("telemetry");
domainObj.getCapability("telemetry");
return telemetryCapability &&
telemetryCapability.getMetadata();
}
// Update the latest telemetry data for a specific
// domain object. This will notify listeners.
function update(domainObject, series) {
function update(domainObj, series) {
var count = series && series.getPointCount();
// Only schedule notification if there isn't already
@@ -136,21 +136,21 @@ define(
// Update the latest-value table
if (count > 0) {
pool.put(domainObject.getId(), {
pool.put(domainObj.getId(), {
domain: series.getDomainValue(count - 1),
range: series.getRangeValue(count - 1),
datum: self.makeDatum(domainObject, series, count - 1)
datum: self.makeDatum(domainObj, series, count - 1)
});
}
}
// Prepare a subscription to a specific telemetry-providing
// domain object.
function subscribe(domainObject) {
function subscribe(domainObj) {
var telemetryCapability =
domainObject.getCapability("telemetry");
domainObj.getCapability("telemetry");
return telemetryCapability.subscribe(function (telemetry) {
update(domainObject, telemetry);
update(domainObj, telemetry);
});
}