Commit Graph

41 Commits (92c7419a28a83f45d0d9ac047ade6c21ba281471)

Author SHA1 Message Date
Kim Kulling f527e56f22
Merge branch 'master' into explicitly-default-dtors 2022-08-30 22:21:06 +02:00
Kim Kulling 0571ee21fb Introduce unittest for BaseProcess. 2022-08-28 20:58:52 +02:00
Aaron Gokaslan e93fa6699a Manually fix up 100 more instances where it should be defaulted 2022-08-25 12:20:13 -04:00
Kim Kulling 17d5633a5b Add missing SImpleExtensionCheck 2022-01-19 21:42:14 +01:00
Kim Kulling 05746acb07 Merge branch 'new-file-detection' of https://github.com/krishty/assimp into krishty-new-file-detection 2022-01-16 20:41:24 +01:00
Kim Kulling 50c7301a38 Update copyrights 2022-01-10 21:13:43 +01:00
Kim Kulling 2c66d4d3a2
Optimize the check 2021-12-22 20:43:44 +01:00
Kim Kulling 215f4e1f4d
Fix typo 2021-12-22 20:02:29 +01:00
Kim Kulling 2eb86d75b8
Make sure no overflow can happen
- During UTF32 LE with BOM make sure that the byteswap operation will have enough space when iterating through the text buffer, which shall get encoded.
- closes https://github.com/assimp/assimp/issues/4230
2021-12-22 19:45:19 +01:00
IOhannes m zmölnig 3b8126d26a Fix spelling mistake 2021-10-08 08:48:01 +02:00
Krishty 5895c0c22c more const in format detection
BaseImporter::SearchFileHeaderForToken() expected a pointer to a non-const token list. This was probably an oversight, as nobody would realistically expect the function to change the list. Furthermore, it prevented token lists from being compiled to read-only memory, in some cases even causing the compiler to generate thread-safe initialization.

The list is now const and all callers declare their token lists static const, thus compiling them to read-only memory.
2021-09-11 23:23:05 +02:00
Malcolm Tyrrell 5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
Jason C 7b404788a6
Merge branch 'master' into jc3-cctype-fixes 2021-05-07 14:48:01 -04:00
Krishty b79b84d34e Merge branch 'master' into new-file-detection 2021-05-05 00:09:42 +02:00
Jason C 2925592c64 [assimp] Make sure ctype calls use unsigned char.
Cast to unsigned char as required by C++ (see C++ **[cctype.cyn]** -> ISO C99 section 7.4, [see also](https://en.cppreference.com/w/cpp/string/byte/isspace)).

Addresses https://github.com/assimp/assimp/issues/3867 and then some.
2021-05-04 17:31:13 -04:00
Kim Kulling 9c44c0ab2b
Merge branch 'master' into remove-useless-scaling-prototype 2021-05-04 13:02:00 +02:00
Kim Kulling 39522178aa
Merge branch 'master' into fix-scale-msg 2021-05-04 08:13:12 +02:00
Krishty e6a47d93c2 removed dead code from 0d29203e24 2021-04-24 13:29:15 +02:00
Krishty afe947d5db fixed malformatted message 2021-04-24 12:38:31 +02:00
Krishty b00de10eb3 Simplified importer search and fixed a few bugs
The search for a matching importer had a few issues, see #3791. There were two different mechanisms to determine whether an importer accepts a specific file extension:
1. `aiImporterDesc::mFileExtensions`, which was forwarded to the UI via `BaseImporter::GetExtensionList()`.
2. `BaseImporter::CanRead()` when called with `checkSig == false`, which determines whether to actually use that importer.
Both were redundant and got out of sync repeatedly. I removed 2. completely and replaced it with 1., thereby syncing UI/import and shortening all `BaseImporter::CanRead()` implementations.

Further bugfixes:
- fixed glTF2 importer throwing exceptions when checking whether it can load a file
- removed `BaseImporter::SimpleExtensionCheck()` because it is no longer used and had a bug with case sensitivity

Since the `checkSig` parameter in `BaseImporter::CanRead()` is now useless, it can be removed completely. I’m not sure if this would break ABI compatiblity, so I’ll submit it with a later pull request.
2021-04-24 00:17:50 +02:00
Krishty f761dc72f4 style fix - initializing and assigning empty std::string properly
std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.

With C++11 uniform initialization, you’d simply write s = { } instead.
2021-04-16 23:43:56 +02:00
Kim Kulling da0543972b Fix parsing for AMF-Files. 2021-04-03 10:25:03 +02:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling 857f62cde0 closes pParam.mReference = source; 2020-10-14 20:34:46 +02:00
Malcolm Tyrrell 8f893e3653 Actually, just keep the old behaviour for now. 2020-08-20 14:32:15 +01:00
Malcolm Tyrrell 6f9c61e157 Use case which matches surrounding code. 2020-08-19 17:57:25 +01:00
Malcolm Tyrrell e1a0163e7e Make all exceptions available. 2020-08-18 18:14:51 +01:00
Malcolm Tyrrell 829ff1adf0 Maybe this will help. 2020-08-18 10:33:47 +01:00
Malcolm Tyrrell b1ed751b83 Provide an API for accessing internal errors. 2020-08-18 10:33:42 +01:00
Rahul Sheth 209a61d0e7 Update hunter and utf8cpp inclusion 2020-07-14 19:00:23 -04:00
Kim Kulling 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Kim Kulling 4210318a34
Merge branch 'master' into enable_vs_warning_all 2020-03-15 10:19:49 +01:00
iamAdrianIusca 016c0a8665 small changes 2020-02-18 18:42:59 +02:00
Kim Kulling c2bfbdacf4 fix more warnings. 2020-02-16 15:37:20 +01:00
Marc-Antoine Lortie 4e7e47bd43 Updated copyright dates.
Changed copyright end year to 2020 in every reference "Copyright (c) 2006-XXXX, assimp team".

Changed copyright end year to 2020 in every reference "Copyright (c) 2006-XXXX, ASSIMP Development Team".

Changed copyright end year to 2020 in LICENCE.rtf.

Changed copyright end year in CMakeFiles.txt files and any other places referencing Assimp with a copyright start and end year.
2020-01-20 08:53:12 -05:00
Paul Arden e6a051d953 Fix compilation on VS2013 due to compiler bug with brace initialisers. This fixes issue #2678. 2019-10-16 19:06:57 +11:00
kimkulling 7ff7a5d64e glTF: Try to remove duplicate code. 2019-09-11 17:00:39 +02:00
Gordon MacPherson abdd853ca5 FIX missing update call for scale to post process 2019-08-27 15:50:50 +01:00
Rahul Sheth dab8041bcd rewrite include paths for Hunter packages 2019-06-13 21:32:36 -07:00
Kim Kulling 57c46db042 Reorg of code. 2019-06-06 14:45:43 +02:00