Merge branch 'master' into patch-5

pull/5236/head
Kim Kulling 2023-09-25 16:33:30 +02:00 committed by GitHub
commit 1a6315bb01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 53 deletions

View File

@ -55,7 +55,7 @@ IF(ASSIMP_HUNTER_ENABLED)
add_definitions(-DASSIMP_USE_HUNTER)
ENDIF()
PROJECT(Assimp VERSION 5.2.5)
PROJECT(Assimp VERSION 5.3.0)
# All supported options ###############################################
@ -777,7 +777,7 @@ IF ( ASSIMP_INSTALL )
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs" )
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_COMPONENTS_ALL}")
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS)
SET(cPACK_DEBIAN_PACKAGE_NAME "assimp")
SET(CPACK_DEBIAN_PACKAGE_NAME "assimp")
SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/gtest contrib/zlib workspaces test doc obj samples packaging)
SET(CPACK_DEBIAN_PACKAGE_SOURCE_COPY svn export --force)
SET(CPACK_DEBIAN_CHANGELOG)

View File

@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2023, assimp team
All rights reserved.
@ -49,10 +49,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// --------------------------------------------------------------------------------
// Legal information string - don't remove this.
static const char *LEGAL_INFORMATION =
static constexpr char LEGAL_INFORMATION[] =
"Open Asset Import Library (Assimp).\n"
"A free C/C++ library to import various 3D file formats into applications\n\n"
"(c) 2006-2022, Assimp team\n"
"(c) 2006-2023, Assimp team\n"
"License under the terms and conditions of the 3-clause BSD license\n"
"https://www.assimp.org\n";
@ -150,9 +150,11 @@ ASSIMP_API aiScene::~aiScene() {
// To make sure we won't crash if the data is invalid it's
// much better to check whether both mNumXXX and mXXX are
// valid instead of relying on just one of them.
if (mNumMeshes && mMeshes)
for (unsigned int a = 0; a < mNumMeshes; a++)
if (mNumMeshes && mMeshes) {
for (unsigned int a = 0; a < mNumMeshes; ++a) {
delete mMeshes[a];
}
}
delete[] mMeshes;
if (mNumMaterials && mMaterials) {
@ -162,24 +164,32 @@ ASSIMP_API aiScene::~aiScene() {
}
delete[] mMaterials;
if (mNumAnimations && mAnimations)
for (unsigned int a = 0; a < mNumAnimations; a++)
if (mNumAnimations && mAnimations) {
for (unsigned int a = 0; a < mNumAnimations; ++a) {
delete mAnimations[a];
}
}
delete[] mAnimations;
if (mNumTextures && mTextures)
for (unsigned int a = 0; a < mNumTextures; a++)
if (mNumTextures && mTextures) {
for (unsigned int a = 0; a < mNumTextures; ++a) {
delete mTextures[a];
}
}
delete[] mTextures;
if (mNumLights && mLights)
for (unsigned int a = 0; a < mNumLights; a++)
if (mNumLights && mLights) {
for (unsigned int a = 0; a < mNumLights; ++a) {
delete mLights[a];
}
}
delete[] mLights;
if (mNumCameras && mCameras)
for (unsigned int a = 0; a < mNumCameras; a++)
if (mNumCameras && mCameras) {
for (unsigned int a = 0; a < mNumCameras; ++a) {
delete mCameras[a];
}
}
delete[] mCameras;
aiMetadata::Dealloc(mMetaData);

View File

@ -83,9 +83,9 @@ typedef long ssize_t; /* byte count or error */
#define ZIP_EFWRITE -29 // fwrite error
/**
* Looks up the error message string coresponding to an error number.
* Looks up the error message string corresponding to an error number.
* @param errnum error number
* @return error message string coresponding to errnum or NULL if error is not
* @return error message string corresponding to errnum or NULL if error is not
* found.
*/
extern const char *zip_strerror(int errnum);

View File

@ -73,14 +73,8 @@ typedef uint32_t ai_uint32;
#ifdef __cplusplus
#ifdef ASSIMP_USE_HUNTER
# include <utf8.h>
#else
# include "../contrib/utf8cpp/source/utf8.h"
#endif
#include <cstring>
#include <new> // for std::nothrow_t
#include <new> // for std::nothrow_t
#include <string> // for aiString::Set(const std::string&)
namespace Assimp {
@ -88,16 +82,16 @@ namespace Assimp {
namespace Intern {
// --------------------------------------------------------------------
/** @brief Internal helper class to utilize our internal new/delete
* routines for allocating object of this and derived classes.
*
* By doing this you can safely share class objects between Assimp
* and the application - it works even over DLL boundaries. A good
* example is the #IOSystem where the application allocates its custom
* #IOSystem, then calls #Importer::SetIOSystem(). When the Importer
* destructs, Assimp calls operator delete on the stored #IOSystem.
* If it lies on a different heap than Assimp is working with,
* the application is determined to crash.
*/
* routines for allocating object of this and derived classes.
*
* By doing this you can safely share class objects between Assimp
* and the application - it works even over DLL boundaries. A good
* example is the #IOSystem where the application allocates its custom
* #IOSystem, then calls #Importer::SetIOSystem(). When the Importer
* destructs, Assimp calls operator delete on the stored #IOSystem.
* If it lies on a different heap than Assimp is working with,
* the application is determined to crash.
*/
// --------------------------------------------------------------------
#ifndef SWIG
struct ASSIMP_API AllocateFromAssimpHeap {

View File

@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2023, assimp team
All rights reserved.

View File

@ -2,7 +2,7 @@
[Setup]
AppName=Open Asset Import Library - Viewer
AppVerName=Open Asset Import Library - Viewer (v2.0)
AppVerName=Open Asset Import Library - Viewer (v5.3.0)
DefaultDirName={pf}\AssimpView
DefaultGroupName=AssimpView
UninstallDisplayIcon={app}\bin\x86\assimp.exe
@ -12,9 +12,9 @@ SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico
WizardImageFile=compiler:WizModernImage-IS.BMP
WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP
LicenseFile=License.rtf
OutputBaseFileName=assimp-view-2.0-setup
VersionInfoVersion=2.0.0.0
VersionInfoTextVersion=2.0
OutputBaseFileName=assimp-view-5.0-setup
VersionInfoVersion=5.3.0.0
VersionInfoTextVersion=5.3.0
VersionInfoCompany=Assimp Development Team
ArchitecturesInstallIn64BitMode=x64

View File

@ -2,7 +2,7 @@
[Setup]
AppName=Open Asset Import Library - SDK
AppVerName=Open Asset Import Library - SDK (v5.1.0)
AppVerName=Open Asset Import Library - SDK (v5.3.0)
DefaultDirName={pf}\Assimp
DefaultGroupName=Assimp
UninstallDisplayIcon={app}\bin\x64\assimp.exe
@ -12,9 +12,9 @@ SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico
WizardImageFile=compiler:WizModernImage-IS.BMP
WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP
LicenseFile=License.rtf
OutputBaseFileName=assimp-sdk-5.1.0-setup
VersionInfoVersion=5.1.0.0
VersionInfoTextVersion=5.1.0
OutputBaseFileName=assimp-sdk-5.2.6-setup
VersionInfoVersion=5.3.0.0
VersionInfoTextVersion=5.3.0
VersionInfoCompany=Assimp Development Team
ArchitecturesInstallIn64BitMode=x64

View File

@ -2,7 +2,7 @@
[Setup]
AppName=Open Asset Import Library - SDK
AppVerName=Open Asset Import Library - SDK (v5.1.0)
AppVerName=Open Asset Import Library - SDK (v5.3.0)
DefaultDirName={pf}\Assimp
DefaultGroupName=Assimp
UninstallDisplayIcon={app}\bin\x86\assimp.exe
@ -12,9 +12,9 @@ SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico
WizardImageFile=compiler:WizModernImage-IS.BMP
WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP
LicenseFile=License.rtf
OutputBaseFileName=assimp-sdk-5.1.0-setup
VersionInfoVersion=5.1.0.0
VersionInfoTextVersion=5.1.0
OutputBaseFileName=assimp-sdk-5.2.6-setup
VersionInfoVersion=5.3.0.
VersionInfoTextVersion=5.3.0
VersionInfoCompany=Assimp Development Team
;ArchitecturesInstallIn64BitMode=x64

View File

@ -18,7 +18,7 @@
#else
#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) " (Commit @GIT_COMMIT_HASH@)"
#endif
#define VER_COPYRIGHT_STR "\xA9 2006-2022"
#define VER_COPYRIGHT_STR "\xA9 2006-2023"
#ifdef NDEBUG
#define VER_ORIGINAL_FILENAME_STR "@CMAKE_SHARED_LIBRARY_PREFIX@assimp@LIBRARY_SUFFIX@.dll"

View File

@ -1,4 +1,4 @@
Good IFC test cases
===================
http://www.iai.fzk.de/www-extern/index.php?id=1135
https://www.ifcwiki.org/index.php/Examples

View File

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2023, assimp team
All rights reserved.
@ -48,12 +48,12 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
EXPECT_NE( lv, nullptr );
std::string text( lv );
size_t pos = text.find(std::string("2022"));
size_t pos = text.find(std::string("2023"));
EXPECT_NE(pos, std::string::npos);
}
TEST_F( utVersion, aiGetVersionMinorTest ) {
EXPECT_EQ(aiGetVersionMinor(), 2U);
EXPECT_EQ(aiGetVersionMinor(), 3U);
}
TEST_F( utVersion, aiGetVersionMajorTest ) {
@ -61,7 +61,7 @@ TEST_F( utVersion, aiGetVersionMajorTest ) {
}
TEST_F( utVersion, aiGetVersionPatchTest ) {
EXPECT_EQ(aiGetVersionPatch(), 5U );
EXPECT_EQ(aiGetVersionPatch(), 0U );
}
TEST_F( utVersion, aiGetCompileFlagsTest ) {