Skip to content

Commit 5fdf74b

Browse files
author
jerome.fayot
committed
fix: updated following review
1 parent 402fe6b commit 5fdf74b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Documentation/Contributors/CodingGuide/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ Cartesian3.fromRadians = function (longitude, latitude, height) {
453453
this._mapProjection = options.mapProjection ?? new GeographicProjection();
454454
```
455455
456-
- If an `options` parameter is optional, use `DefaultValues.EMPTY_OBJECT` or `DefaultValues.EMPTY_ARRAY`, e.g.,
456+
- If an `options` parameter is optional and never modified afterwards, use `DefaultValues.EMPTY_OBJECT` or `DefaultValues.EMPTY_ARRAY`, this could prevent from unnecessary memory allocations in code critical path, e.g.,
457457
458458
```javascript
459459
function BaseLayerPickerViewModel(options) {

packages/engine/Source/Scene/Vector3DTileContent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ function initialize(content, arrayBuffer, byteOffset) {
440440
"POLYGON_COUNT",
441441
ComponentDatatype.UNSIGNED_INT,
442442
1,
443-
);
443+
); // Workaround for old vector tilesets using the non-plural name;
444444

445445
if (!defined(polygonCounts)) {
446446
throw new RuntimeError(
@@ -458,7 +458,7 @@ function initialize(content, arrayBuffer, byteOffset) {
458458
"POLYGON_INDEX_COUNT",
459459
ComponentDatatype.UNSIGNED_INT,
460460
1,
461-
);
461+
); // Workaround for old vector tilesets using the non-plural name;
462462

463463
if (!defined(polygonIndexCounts)) {
464464
throw new RuntimeError(
@@ -538,7 +538,7 @@ function initialize(content, arrayBuffer, byteOffset) {
538538
"POLYLINE_COUNT",
539539
ComponentDatatype.UNSIGNED_INT,
540540
1,
541-
);
541+
); // Workaround for old vector tilesets using the non-plural name;
542542

543543
if (!defined(polylineCounts)) {
544544
throw new RuntimeError(

0 commit comments

Comments
 (0)