Changeset 1640


Ignore:
Timestamp:
Jul 17, 2012, 11:31:42 PM (11 years ago)
Author:
sam
Message:

core: fix shitloads of compiler warnings in the Bullet source code.

Location:
trunk/src/bullet
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bullet/BulletCollision/BroadphaseCollision/btDbvt.h

    r1572 r1640  
    9393
    9494#if DBVT_USE_MEMMOVE
     95// LOL BEGIN
    9596#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__) && !defined(__native_client__)
     97// LOL END
    9698#include <memory.h>
    9799#endif
  • trunk/src/bullet/LinearMath/btAlignedObjectArray.h

    r1570 r1640  
    6868
    6969protected:
    70                 SIMD_FORCE_INLINE       int     allocSize(int size)
    71                 {
    72                         return (size ? size*2 : 1);
    73                 }
     70// LOL BEGIN
     71                SIMD_FORCE_INLINE       int     allocSize(int _size)
     72                {
     73                        return (_size ? _size*2 : 1);
     74                }
     75// LOL END
    7476                SIMD_FORCE_INLINE       void    copy(int start,int end, T* dest) const
    7577                {
     
    100102                }
    101103
    102                 SIMD_FORCE_INLINE       void* allocate(int size)
    103                 {
    104                         if (size)
    105                                 return m_allocator.allocate(size);
     104// LOL BEGIN
     105                SIMD_FORCE_INLINE       void* allocate(int _size)
     106                {
     107                        if (_size)
     108                                return m_allocator.allocate(_size);
    106109                        return 0;
    107110                }
     111// LOL END
    108112
    109113                SIMD_FORCE_INLINE       void    deallocate()
     
    474478
    475479        //PCK: whole function
    476         void initializeFromBuffer(void *buffer, int size, int capacity)
     480// LOL BEGIN
     481        void initializeFromBuffer(void *buffer, int _size, int _capacity)
    477482        {
    478483                clear();
    479484                m_ownsMemory = false;
    480485                m_data = (T*)buffer;
    481                 m_size = size;
    482                 m_capacity = capacity;
    483         }
     486                m_size = _size;
     487                m_capacity = _capacity;
     488        }
     489// LOL END
    484490
    485491        void copyFromArray(const btAlignedObjectArray& otherArray)
  • trunk/src/bullet/LinearMath/btHashMap.h

    r1570 r1640  
    5353                        int ret = 0 ;
    5454
    55                         while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
     55// LOL BEGIN
     56                        while( ! (ret = *src - *dst) && *dst)
    5657                                        ++src, ++dst;
     58// LOL END
    5759
    5860                        if ( ret < 0 )
  • trunk/src/bullet/LinearMath/btQuadWord.h

    r1570 r1640  
    6060  /**@brief Return the z value */
    6161                SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; }
     62// LOL BEGIN
    6263  /**@brief Set the x value */
    63                 SIMD_FORCE_INLINE void  setX(btScalar x) { m_floats[0] = x;};
     64                SIMD_FORCE_INLINE void  setX(btScalar _x) { m_floats[0] = _x;};
    6465  /**@brief Set the y value */
    65                 SIMD_FORCE_INLINE void  setY(btScalar y) { m_floats[1] = y;};
     66                SIMD_FORCE_INLINE void  setY(btScalar _y) { m_floats[1] = _y;};
    6667  /**@brief Set the z value */
    67                 SIMD_FORCE_INLINE void  setZ(btScalar z) { m_floats[2] = z;};
     68                SIMD_FORCE_INLINE void  setZ(btScalar _z) { m_floats[2] = _z;};
    6869  /**@brief Set the w value */
    69                 SIMD_FORCE_INLINE void  setW(btScalar w) { m_floats[3] = w;};
     70                SIMD_FORCE_INLINE void  setW(btScalar _w) { m_floats[3] = _w;};
     71// LOL END
    7072  /**@brief Return the x value */
    7173                SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; }
     
    98100   * @param z Value of z
    99101   */
    100                 SIMD_FORCE_INLINE void  setValue(const btScalar& x, const btScalar& y, const btScalar& z)
     102// LOL BEGIN
     103                SIMD_FORCE_INLINE void  setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z)
    101104                {
    102                         m_floats[0]=x;
    103                         m_floats[1]=y;
    104                         m_floats[2]=z;
     105                        m_floats[0]=_x;
     106                        m_floats[1]=_y;
     107                        m_floats[2]=_z;
    105108                        m_floats[3] = 0.f;
    106109                }
     110// LOL END
    107111
    108112/*              void getValue(btScalar *m) const
     
    119123   * @param w Value of w
    120124   */
    121                 SIMD_FORCE_INLINE void  setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
     125// LOL BEGIN
     126                SIMD_FORCE_INLINE void  setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z,const btScalar& _w)
    122127                {
    123                         m_floats[0]=x;
    124                         m_floats[1]=y;
    125                         m_floats[2]=z;
    126                         m_floats[3]=w;
     128                        m_floats[0]=_x;
     129                        m_floats[1]=_y;
     130                        m_floats[2]=_z;
     131                        m_floats[3]=_w;
    127132                }
     133// LOL END
    128134  /**@brief No initialization constructor */
    129135                SIMD_FORCE_INLINE btQuadWord()
     
    137143   * @param z Value of z
    138144   */
    139                 SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z)           
     145// LOL BEGIN
     146                SIMD_FORCE_INLINE btQuadWord(const btScalar& _x, const btScalar& _y, const btScalar& _z)               
    140147                {
    141                         m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = 0.0f;
     148                        m_floats[0] = _x, m_floats[1] = _y, m_floats[2] = _z, m_floats[3] = 0.0f;
    142149                }
     150// LOL END
    143151
    144152/**@brief Initializing constructor
     
    148156   * @param w Value of w
    149157   */
    150                 SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
     158// LOL BEGIN
     159                SIMD_FORCE_INLINE btQuadWord(const btScalar& _x, const btScalar& _y, const btScalar& _z,const btScalar& _w)
    151160                {
    152                         m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = w;
     161                        m_floats[0] = _x, m_floats[1] = _y, m_floats[2] = _z, m_floats[3] = _w;
    153162                }
     163// LOL END
    154164
    155165  /**@brief Set each element to the max of the current values and the values of another btQuadWord
  • trunk/src/bullet/LinearMath/btQuaternion.h

    r1570 r1640  
    3131        //              explicit Quaternion(const btScalar *v) : Tuple4<btScalar>(v) {}
    3232  /**@brief Constructor from scalars */
    33         btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w)
    34                 : btQuadWord(x, y, z, w)
     33// LOL BEGIN
     34        btQuaternion(const btScalar& _x, const btScalar& _y, const btScalar& _z, const btScalar& _w)
     35                : btQuadWord(_x, _y, _z, _w)
    3536        {}
     37// LOL END
    3638  /**@brief Axis angle Constructor
    3739   * @param axis The axis which the rotation is around
    3840   * @param angle The magnitude of the rotation around the angle (Radians) */
    39         btQuaternion(const btVector3& axis, const btScalar& angle)
     41// LOL BEGIN
     42        btQuaternion(const btVector3& axis, const btScalar& _angle)
    4043        {
    41                 setRotation(axis, angle);
    42         }
     44                setRotation(axis, _angle);
     45        }
     46// LOL END
    4347  /**@brief Constructor from Euler angles
    4448   * @param yaw Angle around Y unless BT_EULER_DEFAULT_ZYX defined then Z
     
    5660   * @param axis The axis around which to rotate
    5761   * @param angle The magnitude of the rotation in Radians */
    58         void setRotation(const btVector3& axis, const btScalar& angle)
     62// LOL BEGIN
     63        void setRotation(const btVector3& axis, const btScalar& _angle)
    5964        {
    6065                btScalar d = axis.length();
    6166                btAssert(d != btScalar(0.0));
    62                 btScalar s = btSin(angle * btScalar(0.5)) / d;
     67                btScalar s = btSin(_angle * btScalar(0.5)) / d;
    6368                setValue(axis.x() * s, axis.y() * s, axis.z() * s,
    64                         btCos(angle * btScalar(0.5)));
    65         }
     69                        btCos(_angle * btScalar(0.5)));
     70        }
     71// LOL END
    6672  /**@brief Set the quaternion using Euler angles
    6773   * @param yaw Angle around Y
  • trunk/src/bullet/LinearMath/btSerializer.h

    r1572 r1640  
    2121#include "btHashMap.h"
    2222
     23// LOL BEGIN
    2324#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__) && !defined(__native_client__)
     25// LOL END
    2426#include <memory.h>
    2527#endif
  • trunk/src/bullet/LinearMath/btVector3.h

    r1570 r1640  
    8080   * @param z Z value
    8181   */
    82         SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z)
    83         {
    84                 m_floats[0] = x;
    85                 m_floats[1] = y;
    86                 m_floats[2] = z;
     82// LOL BEGIN
     83        SIMD_FORCE_INLINE btVector3(const btScalar& _x, const btScalar& _y, const btScalar& _z)
     84        {
     85                m_floats[0] = _x;
     86                m_floats[1] = _y;
     87                m_floats[2] = _z;
    8788                m_floats[3] = btScalar(0.);
    8889        }
     90// LOL END
    8991
    9092       
     
    268270  /**@brief Return the z value */
    269271                SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; }
     272// LOL BEGIN
    270273  /**@brief Set the x value */
    271                 SIMD_FORCE_INLINE void  setX(btScalar x) { m_floats[0] = x;};
     274                SIMD_FORCE_INLINE void  setX(btScalar _x) { m_floats[0] = _x;};
    272275  /**@brief Set the y value */
    273                 SIMD_FORCE_INLINE void  setY(btScalar y) { m_floats[1] = y;};
     276                SIMD_FORCE_INLINE void  setY(btScalar _y) { m_floats[1] = _y;};
    274277  /**@brief Set the z value */
    275                 SIMD_FORCE_INLINE void  setZ(btScalar z) {m_floats[2] = z;};
     278                SIMD_FORCE_INLINE void  setZ(btScalar _z) {m_floats[2] = _z;};
    276279  /**@brief Set the w value */
    277                 SIMD_FORCE_INLINE void  setW(btScalar w) { m_floats[3] = w;};
     280                SIMD_FORCE_INLINE void  setW(btScalar _w) { m_floats[3] = _w;};
     281// LOL END
    278282  /**@brief Return the x value */
    279283                SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; }
     
    322326                }
    323327
    324                 SIMD_FORCE_INLINE void  setValue(const btScalar& x, const btScalar& y, const btScalar& z)
    325                 {
    326                         m_floats[0]=x;
    327                         m_floats[1]=y;
    328                         m_floats[2]=z;
     328// LOL BEGIN
     329                SIMD_FORCE_INLINE void  setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z)
     330                {
     331                        m_floats[0]=_x;
     332                        m_floats[1]=_y;
     333                        m_floats[2]=_z;
    329334                        m_floats[3] = btScalar(0.);
    330335                }
     336// LOL END
    331337
    332338                void    getSkewSymmetricMatrix(btVector3* v0,btVector3* v1,btVector3* v2) const
     
    492498}
    493499
    494 SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) const
     500// LOL BEGIN
     501SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar _angle ) const
    495502{
    496503        // wAxis must be a unit lenght vector
    497504
    498505        btVector3 o = wAxis * wAxis.dot( *this );
    499         btVector3 x = *this - o;
    500         btVector3 y;
    501 
    502         y = wAxis.cross( *this );
    503 
    504         return ( o + x * btCos( angle ) + y * btSin( angle ) );
    505 }
     506        btVector3 _x = *this - o;
     507        btVector3 _y;
     508
     509        _y = wAxis.cross( *this );
     510
     511        return ( o + _x * btCos( _angle ) + _y * btSin( _angle ) );
     512}
     513// LOL END
    506514
    507515class btVector4 : public btVector3
     
    512520
    513521
    514         SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
    515                 : btVector3(x,y,z)
    516         {
    517                 m_floats[3] = w;
    518         }
     522// LOL BEGIN
     523        SIMD_FORCE_INLINE btVector4(const btScalar& _x, const btScalar& _y, const btScalar& _z,const btScalar& _w)
     524                : btVector3(_x,_y,_z)
     525        {
     526                m_floats[3] = _w;
     527        }
     528// LOL END
    519529
    520530
     
    624634   * @param w Value of w
    625635   */
    626                 SIMD_FORCE_INLINE void  setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
    627                 {
    628                         m_floats[0]=x;
    629                         m_floats[1]=y;
    630                         m_floats[2]=z;
    631                         m_floats[3]=w;
    632                 }
     636// LOL BEGIN
     637                SIMD_FORCE_INLINE void  setValue(const btScalar& _x, const btScalar& _y, const btScalar& _z,const btScalar& _w)
     638                {
     639                        m_floats[0]=_x;
     640                        m_floats[1]=_y;
     641                        m_floats[2]=_z;
     642                        m_floats[3]=_w;
     643                }
     644// LOL END
    633645
    634646
     
    641653        #ifdef BT_USE_DOUBLE_PRECISION
    642654        unsigned char* dest = (unsigned char*) &destVal;
    643         unsigned char* src  = (unsigned char*) &sourceVal;
     655// LOL BEGIN
     656        unsigned char const* src  = (unsigned char const*) &sourceVal;
     657// LOL END
    644658        dest[0] = src[7];
    645659    dest[1] = src[6];
     
    652666#else
    653667        unsigned char* dest = (unsigned char*) &destVal;
    654         unsigned char* src  = (unsigned char*) &sourceVal;
     668// LOL BEGIN
     669        unsigned char const* src  = (unsigned char const*) &sourceVal;
     670// LOL END
    655671        dest[0] = src[3];
    656672    dest[1] = src[2];
Note: See TracChangeset for help on using the changeset viewer.