Commit Graph

21 Commits (87c309566fd7e32a9c54c18ab8155f412e863f25)

Author SHA1 Message Date
Kim Kulling f830d7998e
Merge branch 'master' into clean-up-ctors-dtors 2023-01-23 21:21:34 +01:00
Krishty 36305cf987 Tidy Up Constructors and Destructors
This commit does not add or remove c’tors or d’tors, so it is *not* ABI-breaking.

If a c’tor/d’tor does nothing else than the default behavior, this commit replaces it with “= default”.

If an initializer list entry does nothing else than the default behavior, this commit removes it. First and foremost, remove default c’tor calls of base classes (always called by the compiler if no other base c’tor is explicitly called) and c’tor calls of members with complex types (e.g. “std::vector”).

In a few instances, user-defined copy c’tors / move c’tors / assignment operators / move assignment operators were replaced with “= default”, too. I only did this if I had a clear understanding of what’s going on.
2023-01-16 21:47:11 +01:00
Krishty bad76fd0f1 Replace Variables With Literals 2023-01-16 08:18:36 +01:00
Kim Kulling e5747dad9b First concepts 2022-04-05 20:07:22 +02: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
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
Krishty 0f3e6e2941 replaced std::size() with AI_COUNT_OF for pre-C++20 compilers 2021-05-05 00:08:54 +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
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling 8c135f779e
Merge branch 'master' into readFbxWeightsInConfig 2020-10-28 20:38:29 +01:00
Malcolm Tyrrell 0363c18f1f Read weights 2020-10-15 10:07:24 +01:00
Malcolm Tyrrell 4bdaf20b70 Add comment. 2020-10-05 14:23:42 +01:00
Malcolm Tyrrell 585fb89154 Make an assert a DeadlyImportError. 2020-10-02 15:25:16 +01:00
Joshua Hyatt 638499a278 Replace unique_ptr and add custom deleter 2020-09-01 10:30:31 -06:00
Joshua Hyatt dcf9a7b2d8 Conform variable names to code standards 2020-08-29 23:58:31 -06:00
Joshua Hyatt 953e976de6 Close stream when finished 2020-08-29 23:56:50 -06:00
Joshua Hyatt cc2613f264 Replace unique_ptr with raw pointer 2020-08-29 23:06:33 -06:00
Malcolm Tyrrell bcca3a0d79 No need for bespoke macros 2020-05-15 17:22:02 +01:00
Malcolm Tyrrell 6be0ce1ec9 Initial pass at adding logging 2020-05-15 17:21:45 +01:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00