Browse Source

const pointers for JPC_Shape functions

Lucien Greathouse 1 year ago
parent
commit
5781081785
2 changed files with 8 additions and 8 deletions
  1. 4 4
      JoltC/Functions.h
  2. 4 4
      JoltC/JoltC.cpp

+ 4 - 4
JoltC/Functions.h

@@ -283,11 +283,11 @@ JPC_API const char* JPC_String_c_str(JPC_String* self);
 
 typedef struct JPC_Shape JPC_Shape;
 
-JPC_API uint32_t JPC_Shape_GetRefCount(JPC_Shape* self);
-JPC_API void JPC_Shape_AddRef(JPC_Shape* self);
-JPC_API void JPC_Shape_Release(JPC_Shape* self);
+JPC_API uint32_t JPC_Shape_GetRefCount(const JPC_Shape* self);
+JPC_API void JPC_Shape_AddRef(const JPC_Shape* self);
+JPC_API void JPC_Shape_Release(const JPC_Shape* self);
 
-JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(JPC_Shape* self);
+JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(const JPC_Shape* self);
 
 ////////////////////////////////////////////////////////////////////////////////
 // TriangleShapeSettings

+ 4 - 4
JoltC/JoltC.cpp

@@ -365,19 +365,19 @@ JPC_API const char* JPC_String_c_str(JPC_String* self) {
 ////////////////////////////////////////////////////////////////////////////////
 // Shape
 
-JPC_API uint32_t JPC_Shape_GetRefCount(JPC_Shape* self) {
+JPC_API uint32_t JPC_Shape_GetRefCount(const JPC_Shape* self) {
 	return to_jph(self)->GetRefCount();
 }
 
-JPC_API void JPC_Shape_AddRef(JPC_Shape* self) {
+JPC_API void JPC_Shape_AddRef(const JPC_Shape* self) {
 	return to_jph(self)->AddRef();
 }
 
-JPC_API void JPC_Shape_Release(JPC_Shape* self) {
+JPC_API void JPC_Shape_Release(const JPC_Shape* self) {
 	return to_jph(self)->Release();
 }
 
-JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(JPC_Shape* self) {
+JPC_API JPC_Vec3 JPC_Shape_GetCenterOfMass(const JPC_Shape* self) {
 	return to_jpc(to_jph(self)->GetCenterOfMass());
 }