update assimp lib

This commit is contained in:
marauder2k7 2024-12-09 20:22:47 +00:00
parent 03a348deb7
commit d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions

View file

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.
@ -86,7 +86,7 @@ public:
*/
LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true);
~LineSplitter();
~LineSplitter() = default;
// -----------------------------------------
/** pseudo-iterator increment */
@ -110,6 +110,8 @@ public:
std::string operator* () const;
const char *getEnd() const;
// -----------------------------------------
/** boolean context */
operator bool() const;
@ -139,6 +141,7 @@ public:
private:
line_idx mIdx;
std::string mCur;
const char *mEnd;
StreamReaderLE& mStream;
bool mSwallow, mSkip_empty_lines, mTrim;
};
@ -146,19 +149,17 @@ private:
AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_empty_lines, bool trim ) :
mIdx(0),
mCur(),
mEnd(nullptr),
mStream(stream),
mSwallow(),
mSkip_empty_lines(skip_empty_lines),
mTrim(trim) {
mCur.reserve(1024);
mEnd = mCur.c_str() + 1024;
operator++();
mIdx = 0;
}
AI_FORCE_INLINE LineSplitter::~LineSplitter() {
// empty
}
AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
if (mSwallow) {
mSwallow = false;
@ -206,14 +207,14 @@ AI_FORCE_INLINE LineSplitter &LineSplitter::operator++(int) {
AI_FORCE_INLINE const char *LineSplitter::operator[] (size_t idx) const {
const char* s = operator->()->c_str();
SkipSpaces(&s);
SkipSpaces(&s, mEnd);
for (size_t i = 0; i < idx; ++i) {
for (; !IsSpace(*s); ++s) {
if (IsLineEnd(*s)) {
throw std::range_error("Token index out of range, EOL reached");
}
}
SkipSpaces(&s);
SkipSpaces(&s, mEnd);
}
return s;
}
@ -222,7 +223,7 @@ template <size_t N>
AI_FORCE_INLINE void LineSplitter::get_tokens(const char* (&tokens)[N]) const {
const char* s = operator->()->c_str();
SkipSpaces(&s);
SkipSpaces(&s, mEnd);
for (size_t i = 0; i < N; ++i) {
if (IsLineEnd(*s)) {
throw std::range_error("Token count out of range, EOL reached");
@ -230,7 +231,7 @@ AI_FORCE_INLINE void LineSplitter::get_tokens(const char* (&tokens)[N]) const {
tokens[i] = s;
for (; *s && !IsSpace(*s); ++s);
SkipSpaces(&s);
SkipSpaces(&s, mEnd);
}
}
@ -242,6 +243,10 @@ AI_FORCE_INLINE std::string LineSplitter::operator* () const {
return mCur;
}
AI_FORCE_INLINE const char* LineSplitter::getEnd() const {
return mEnd;
}
AI_FORCE_INLINE LineSplitter::operator bool() const {
return mStream.GetRemainingSize() > 0;
}