Fix 16 typos (#5518)

Signed-off-by: RoboSchmied <github@roboschmie.de>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
RoboSchmied
2024-04-06 21:26:32 +02:00
committed by GitHub
co-authored by Kim Kulling
parent 9d11b220eb
commit 52c2b6896a
9 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -263,7 +263,7 @@ struct ByteSwapper<T,false> {
};
// --------------------------------------------------------------------------------------------
template <bool SwapEndianess, typename T, bool RuntimeSwitch>
template <bool SwapEndianness, typename T, bool RuntimeSwitch>
struct Getter {
void operator() (T* inout, bool le) {
#ifdef AI_BUILD_BIG_ENDIAN
@@ -278,12 +278,12 @@ struct Getter {
}
};
template <bool SwapEndianess, typename T>
struct Getter<SwapEndianess,T,false> {
template <bool SwapEndianness, typename T>
struct Getter<SwapEndianness,T,false> {
void operator() (T* inout, bool /*le*/) {
// static branch
ByteSwapper<T,(SwapEndianess && sizeof(T)>1)> () (inout);
ByteSwapper<T,(SwapEndianness && sizeof(T)>1)> () (inout);
}
};
} // end Intern
+3 -3
View File
@@ -68,7 +68,7 @@ namespace Assimp {
*
* XXX switch from unsigned int for size types to size_t? or ptrdiff_t?*/
// --------------------------------------------------------------------------------------------
template <bool SwapEndianess = false, bool RuntimeSwitch = false>
template <bool SwapEndianness = false, bool RuntimeSwitch = false>
class StreamReader {
public:
using diff = size_t;
@@ -84,7 +84,7 @@ public:
* reads from the current position to the end of the stream.
* @param le If @c RuntimeSwitch is true: specifies whether the
* stream is in little endian byte order. Otherwise the
* endianness information is contained in the @c SwapEndianess
* endianness information is contained in the @c SwapEndianness
* template parameter and this parameter is meaningless. */
StreamReader(std::shared_ptr<IOStream> stream, bool le = false) :
mStream(stream),
@@ -291,7 +291,7 @@ public:
T f;
::memcpy(&f, mCurrent, sizeof(T));
Intern::Getter<SwapEndianess, T, RuntimeSwitch>()(&f, mLe);
Intern::Getter<SwapEndianness, T, RuntimeSwitch>()(&f, mLe);
mCurrent += sizeof(T);
return f;
+3 -3
View File
@@ -65,7 +65,7 @@ namespace Assimp {
* stream is to be determined at runtime.
*/
// --------------------------------------------------------------------------------------------
template <bool SwapEndianess = false, bool RuntimeSwitch = false>
template <bool SwapEndianness = false, bool RuntimeSwitch = false>
class StreamWriter {
enum {
INITIAL_CAPACITY = 1024
@@ -82,7 +82,7 @@ public:
continues at the current position of the stream cursor.
* @param le If @c RuntimeSwitch is true: specifies whether the
* stream is in little endian byte order. Otherwise the
* endianness information is defined by the @c SwapEndianess
* endianness information is defined by the @c SwapEndianness
* template parameter and this parameter is meaningless. */
StreamWriter(std::shared_ptr<IOStream> stream, bool le = false)
: stream(stream)
@@ -260,7 +260,7 @@ public:
/** Generic write method. ByteSwap::Swap(T*) *must* be defined */
template <typename T>
void Put(T f) {
Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f, le);
Intern :: Getter<SwapEndianness,T,RuntimeSwitch>() (&f, le);
if (cursor + sizeof(T) >= buffer.size()) {
buffer.resize(cursor + sizeof(T));