Skip to content

Commit 925e760

Browse files
committed
Make geod a let constant.
1 parent 3bd3dc1 commit 925e760

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Sources/GeographicLib/Geodesic.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import CGeographicLib
1616
///
1717
/// The default ellipsoid is WGS-84, but custom ellipsoids can be specified.
1818
public struct Geodesic: Sendable {
19-
internal private(set) var geod: geod_geodesic
19+
internal let geod: geod_geodesic
2020

2121
// MARK: - Initialization
2222

@@ -30,8 +30,9 @@ public struct Geodesic: Sendable {
3030
/// - equatorialRadius: The equatorial radius in meters
3131
/// - flattening: The flattening of the ellipsoid
3232
public init(equatorialRadius: Double, flattening: Double) {
33-
self.geod = geod_geodesic()
34-
geod_init(&self.geod, equatorialRadius, flattening)
33+
var geod = geod_geodesic()
34+
geod_init(&geod, equatorialRadius, flattening)
35+
self .geod = geod
3536
}
3637

3738
// MARK: - Properties

0 commit comments

Comments
 (0)