Skip to content

Commit 28e4495

Browse files
committed
AER-4544 - stop naming RD in the generic projection module
Review: registerProjection has no business knowing which constant its callers pass. The reference-aliasing hazard is the same for any shared extent.
1 parent a21b1ab commit 28e4495

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/projections/registerProjection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export function registerProjection(geo: ProjectionInfo): void {
1919
proj4.defs(geo.epsgCode, geo.projection);
2020
register(proj4);
2121
// The extent is needed for tile-grid resolutions and for reprojecting raster sources into this
22-
// projection. Copied because setExtent stores the array by reference, and callers pass a shared
23-
// constant (RD_EXTENT), which OpenLayers would then be able to mutate out from under them.
22+
// projection. Copied because setExtent stores the array by reference, and callers likely pass a
23+
// shared constant, which OpenLayers would then be able to mutate out from under them.
2424
getProjection(geo.epsgCode)?.setExtent([...geo.extent]);
2525
registeredEpsgCodes.add(geo.epsgCode);
2626
}

0 commit comments

Comments
 (0)