fix misalignment in vector2 [] operator.
parent
eb0608f2e9
commit
151d71bc69
|
@ -114,7 +114,15 @@ const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
TReal aiVector2t<TReal>::operator[](unsigned int i) const {
|
||||
return *(&x + i);
|
||||
switch (i) {
|
||||
case 0:
|
||||
return x;
|
||||
case 1:
|
||||
return y;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -142,7 +142,6 @@ AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatri
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
|
||||
// return *(&x + i);
|
||||
switch (i) {
|
||||
case 0:
|
||||
return x;
|
||||
|
|
Loading…
Reference in New Issue