Merge pull request #1687 from assimp/issue_1574

closes https://github.com/assimp/assimp/issues/1574: add API to get n…
pull/1688/head
Kim Kulling 2018-01-07 12:33:43 +01:00 committed by GitHub
commit 2aa68d7519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -111,6 +111,10 @@ ASSIMP_API unsigned int aiGetVersionRevision() {
return GitVersion; return GitVersion;
} }
ASSIMP_API const char *aiGetBranchName() {
return GitBranch;
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
ASSIMP_API aiScene::aiScene() ASSIMP_API aiScene::aiScene()
: mFlags(0) : mFlags(0)

View File

@ -82,6 +82,12 @@ ASSIMP_API unsigned int aiGetVersionMajor (void);
*/ */
ASSIMP_API unsigned int aiGetVersionRevision (void); ASSIMP_API unsigned int aiGetVersionRevision (void);
// ---------------------------------------------------------------------------
/** @brief Returns the branchname of the Assimp runtime.
* @return The current branch name.
*/
ASSIMP_API const char *aiGetBranchName();
//! Assimp was compiled as a shared object (Windows: DLL) //! Assimp was compiled as a shared object (Windows: DLL)
#define ASSIMP_CFLAGS_SHARED 0x1 #define ASSIMP_CFLAGS_SHARED 0x1
//! Assimp was compiled against STLport //! Assimp was compiled against STLport

View File

@ -69,3 +69,8 @@ TEST_F( utVersion, aiGetVersionRevisionTest ) {
EXPECT_NE( aiGetVersionRevision(), 0U ); EXPECT_NE( aiGetVersionRevision(), 0U );
} }
TEST_F( utVersion, aiGetBranchNameTest ) {
EXPECT_NE( nullptr, aiGetBranchName() );
}