Skip to content

Commit e83558a

Browse files
committed
ConstCharacterBase: strengthen the getPhysicsSystem() method
1 parent 36bd671 commit e83558a

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/main/java/com/github/stephengold/joltjni/CharacterRefC.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ public Vec3 getLinearVelocity(boolean lockBodies) {
360360
* @return the pre-existing object (not {@code null})
361361
*/
362362
@Override
363-
public ConstPhysicsSystem getPhysicsSystem() {
364-
ConstPhysicsSystem result = ptr.getPhysicsSystem();
363+
public PhysicsSystem getPhysicsSystem() {
364+
PhysicsSystem result = ptr.getPhysicsSystem();
365365
return result;
366366
}
367367

src/main/java/com/github/stephengold/joltjni/CharacterVirtualRefC.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ public float getMaxStrength() {
476476
* @return the pre-existing instance
477477
*/
478478
@Override
479-
public ConstPhysicsSystem getPhysicsSystem() {
480-
ConstPhysicsSystem result = ptr.getPhysicsSystem();
479+
public PhysicsSystem getPhysicsSystem() {
480+
PhysicsSystem result = ptr.getPhysicsSystem();
481481
return result;
482482
}
483483

src/main/java/com/github/stephengold/joltjni/readonly/ConstCharacterBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ of this software and associated documentation files (the "Software"), to deal
2121
*/
2222
package com.github.stephengold.joltjni.readonly;
2323

24+
import com.github.stephengold.joltjni.PhysicsSystem;
2425
import com.github.stephengold.joltjni.RVec3;
2526
import com.github.stephengold.joltjni.ShapeRefC;
2627
import com.github.stephengold.joltjni.StateRecorder;
@@ -137,7 +138,7 @@ public interface ConstCharacterBase extends ConstJoltPhysicsObject {
137138
*
138139
* @return the pre-existing instance, or {@code null} if none
139140
*/
140-
ConstPhysicsSystem getPhysicsSystem();
141+
PhysicsSystem getPhysicsSystem();
141142

142143
/**
143144
* Copy the character's "up" direction. The character is unaffected.

0 commit comments

Comments
 (0)