Selaa lähdekoodia

feat: created the aiGetStringC_Str() function. (#6059)

* feat: created the aiGetStringC_Str() function.

The C++ Interface's function C_Str() from the aiString struct was missing an equivalent function for the C Interface.

* changed the first parameter of the aiGetStringC_Str function to be const.

---------

Co-authored-by: Kim Kulling <[email protected]>
leliel 5 kuukautta sitten
vanhempi
commit
79cba055b9
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      code/Material/MaterialSystem.cpp

+ 6 - 0
code/Material/MaterialSystem.cpp

@@ -401,6 +401,12 @@ aiReturn aiGetMaterialString(const aiMaterial *pMat,
     return AI_SUCCESS;
     return AI_SUCCESS;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
+// Get a c-like string fron an aiString
+const char *aiGetStringC_Str(const aiString *str) {
+	return str->data;
+}
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get the number of textures on a particular texture stack
 // Get the number of textures on a particular texture stack
 unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial *pMat, C_ENUM aiTextureType type) {
 unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial *pMat, C_ENUM aiTextureType type) {