Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces DeveloperError(s) with Check(s) in Color.js #5424

Merged
merged 4 commits into from
Jun 6, 2017

Conversation

AnimatedRNG
Copy link
Contributor

Part of #4794

Copy link
Contributor

@lilleyse lilleyse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just this suggestions:

}

Check.typeOf.object('cartesian', cartesian);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout, remove any empty lines surrounding the check.

@@ -1,12 +1,14 @@
/*global define*/
define([
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now remove DeveloperError from the list.

//>>includeEnd('debug');

Check.typeOf.number.lessThanOrEquals('minimumGreen', minimumGreen, maximumGreen);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout, make sure the Check call is between //>>includeStart('debug', pragmas.debug); and //>>includeEnd('debug');. The purpose of those is to mark code that should not be included in the release build.

throw new DeveloperError('alpha is required');
}

Check.defined('color', color);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Check.typeOf.object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look out for this with the rest of the checks. The one exception is for arrays which should continue to be checked with Check.defined since we don't have a Check.typeOf.array.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I'll make those changes

}

Check.defined('color', color);
Check.defined('alpha', alpha);
Copy link
Contributor

@lilleyse lilleyse Jun 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Check.typeOf.number.

@lilleyse
Copy link
Contributor

lilleyse commented Jun 6, 2017

The fixes look good!

@lilleyse lilleyse merged commit 7b5675e into CesiumGS:master Jun 6, 2017
@AnimatedRNG AnimatedRNG deleted the color-check branch June 8, 2017 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants