Changeset 1381


Ignore:
Timestamp:
May 13, 2012, 10:14:42 PM (11 years ago)
Author:
sam
Message:

core: some clang and g++ 4.7 compilation fixes.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/array.h

    r1345 r1381  
    271271            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4;
    272272            T5 tmp5 = m5; T6 tmp6 = m6; T7 tmp7 = m7; T8 tmp8 = m8;
    273             Reserve(this->m_count * 13 / 8 + 8);
     273            this->Reserve(this->m_count * 13 / 8 + 8);
    274274            this->m_data[this->m_count].m1 = tmp1;
    275275            this->m_data[this->m_count].m2 = tmp2;
     
    310310            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4;
    311311            T5 tmp5 = m5; T6 tmp6 = m6; T7 tmp7 = m7;
    312             Reserve(this->m_count * 13 / 8 + 8);
     312            this->Reserve(this->m_count * 13 / 8 + 8);
    313313            this->m_data[this->m_count].m1 = tmp1;
    314314            this->m_data[this->m_count].m2 = tmp2;
     
    347347            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4;
    348348            T5 tmp5 = m5; T6 tmp6 = m6;
    349             Reserve(this->m_count * 13 / 8 + 8);
     349            this->Reserve(this->m_count * 13 / 8 + 8);
    350350            this->m_data[this->m_count].m1 = tmp1;
    351351            this->m_data[this->m_count].m2 = tmp2;
     
    381381            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4;
    382382            T5 tmp5 = m5;
    383             Reserve(this->m_count * 13 / 8 + 8);
     383            this->Reserve(this->m_count * 13 / 8 + 8);
    384384            this->m_data[this->m_count].m1 = tmp1;
    385385            this->m_data[this->m_count].m2 = tmp2;
     
    411411        {
    412412            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3; T4 tmp4 = m4;
    413             Reserve(this->m_count * 13 / 8 + 8);
     413            this->Reserve(this->m_count * 13 / 8 + 8);
    414414            this->m_data[this->m_count].m1 = tmp1;
    415415            this->m_data[this->m_count].m2 = tmp2;
     
    439439        {
    440440            T1 tmp1 = m1; T2 tmp2 = m2; T3 tmp3 = m3;
    441             Reserve(this->m_count * 13 / 8 + 8);
     441            this->Reserve(this->m_count * 13 / 8 + 8);
    442442            this->m_data[this->m_count].m1 = tmp1;
    443443            this->m_data[this->m_count].m2 = tmp2;
     
    465465        {
    466466            T1 tmp1 = m1; T2 tmp2 = m2;
    467             Reserve(this->m_count * 13 / 8 + 8);
     467            this->Reserve(this->m_count * 13 / 8 + 8);
    468468            this->m_data[this->m_count].m1 = tmp1;
    469469            this->m_data[this->m_count].m2 = tmp2;
  • trunk/src/lol/math/real.h

    r1313 r1381  
    277277template<> void real::print(int ndigits) const;
    278278
     279template<> real const real::R_0;
     280template<> real const real::R_1;
     281template<> real const real::R_2;
     282template<> real const real::R_3;
     283template<> real const real::R_10;
     284
     285template<> real const real::R_LN2;
     286template<> real const real::R_LN10;
     287template<> real const real::R_LOG2E;
     288template<> real const real::R_LOG10E;
     289template<> real const real::R_E;
     290template<> real const real::R_PI;
     291template<> real const real::R_PI_2;
     292template<> real const real::R_PI_3;
     293template<> real const real::R_PI_4;
     294template<> real const real::R_1_PI;
     295template<> real const real::R_2_PI;
     296template<> real const real::R_2_SQRTPI;
     297template<> real const real::R_SQRT2;
     298template<> real const real::R_SQRT3;
     299template<> real const real::R_SQRT1_2;
     300
    279301} /* namespace lol */
    280302
  • trunk/src/lol/math/vector.h

    r1369 r1381  
    965965    static Quat<T> fromeuler_zyx(T phi, T theta, T psi);
    966966
    967     inline Quat<T> operator *(Quat<T> const &val) const
    968     {
    969         Quat<T> ret;
    970         Vec3<T> v1(x, y, z);
    971         Vec3<T> v2(val.x, val.y, val.z);
    972         Vec3<T> v3 = cross(v1, v2) + w * v2 + val.w * v1;
    973         return Quat<T>(w * val.w - dot(v1, v2), v3.x, v3.y, v3.z);
    974     }
     967    inline Quat<T> operator *(Quat<T> const &val) const;
    975968
    976969    inline Quat<T> operator *=(Quat<T> const &val)
     
    15221515#undef DECLARE_ALL_VECTOR_OPS_INNER
    15231516#undef DECLARE_ALL_VECTOR_OPS
     1517
     1518/*
     1519 * Definition of additional functions requiring vector functions
     1520 */
     1521
     1522template<typename T>
     1523inline Quat<T> Quat<T>::operator *(Quat<T> const &val) const
     1524{
     1525    Quat<T> ret;
     1526    Vec3<T> v1(x, y, z);
     1527    Vec3<T> v2(val.x, val.y, val.z);
     1528    Vec3<T> v3 = cross(v1, v2) + w * v2 + val.w * v1;
     1529    return Quat<T>(w * val.w - dot(v1, v2), v3.x, v3.y, v3.z);
     1530}
    15241531
    15251532/*
Note: See TracChangeset for help on using the changeset viewer.