Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7621


Ignore:
Timestamp:
Nov 6, 2010, 3:05:53 PM (13 years ago)
Author:
rgrieder
Message:

Renamed FORCEINLINE macro to ORX_FORCEINLINE because of conflicts (resulting in a load of warnings with Ogre v1.7 and gcc) with OgrePlatform.h.

Location:
code/branches/ois_update/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ois_update/src/OrxonoxConfig.h.in

    r7525 r7621  
    8888// See if we can use __forceinline or if we need to use __inline instead
    8989#cmakedefine HAVE_FORCEINLINE
    90 #ifndef FORCEINLINE
     90#ifndef ORX_FORCEINLINE
    9191#  ifdef HAVE_FORCEINLINE
    92 #    define FORCEINLINE __forceinline
     92#    define ORX_FORCEINLINE __forceinline
    9393#  else
    94 #    define FORCEINLINE __inline
     94#    define ORX_FORCEINLINE __inline
    9595#  endif
    9696#endif
  • code/branches/ois_update/src/libraries/core/Identifier.h

    r7401 r7621  
    123123
    124124            /// Returns the unique ID of the class.
    125             FORCEINLINE unsigned int getClassID() const { return this->classID_; }
     125            ORX_FORCEINLINE unsigned int getClassID() const { return this->classID_; }
    126126
    127127            /// Returns the list of all existing objects of this class.
     
    486486    */
    487487    template <class T, class U>
    488     FORCEINLINE T orxonox_cast(U* source)
     488    ORX_FORCEINLINE T orxonox_cast(U* source)
    489489    {
    490490#ifdef ORXONOX_COMPILER_MSVC
  • code/branches/ois_update/src/libraries/core/OrxonoxClass.h

    r7401 r7621  
    136136                Returns NULL if the no pointer was found.
    137137            */
    138             FORCEINLINE void* getDerivedPointer(unsigned int classID)
     138            ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID)
    139139            {
    140140                for (int i = this->objectPointers_.size() - 1; i >= 0; --i)
     
    147147
    148148            /// Version of getDerivedPointer with template
    149             template <class T> FORCEINLINE T* getDerivedPointer(unsigned int classID)
     149            template <class T> ORX_FORCEINLINE T* getDerivedPointer(unsigned int classID)
    150150            {   return static_cast<T*>(this->getDerivedPointer(classID));   }
    151151            /// Const version of getDerivedPointer with template
    152             template <class T> FORCEINLINE const T* getDerivedPointer(unsigned int classID) const
     152            template <class T> ORX_FORCEINLINE const T* getDerivedPointer(unsigned int classID) const
    153153            {   return const_cast<OrxonoxClass*>(this)->getDerivedPointer<T>(classID);   }
    154154
  • code/branches/ois_update/src/libraries/core/input/InputDevice.h

    r7271 r7621  
    184184    protected:
    185185        //! Common code for all button pressed events (updates pressed buttons list and calls the input states)
    186         FORCEINLINE void buttonPressed(ButtonTypeParam button)
     186        ORX_FORCEINLINE void buttonPressed(ButtonTypeParam button)
    187187        {
    188188            // check whether the button already is in the list (can happen when focus was lost)
     
    201201
    202202        //! Common code for all button released events (updates pressed buttons list and calls the input states)
    203         FORCEINLINE void buttonReleased(ButtonTypeParam button)
     203        ORX_FORCEINLINE void buttonReleased(ButtonTypeParam button)
    204204        {
    205205            // remove the button from the pressedButtons_ list
  • code/branches/ois_update/src/libraries/core/input/InputState.h

    r7401 r7621  
    176176    };
    177177
    178     FORCEINLINE void InputState::update(float dt)
     178    ORX_FORCEINLINE void InputState::update(float dt)
    179179    {
    180180        for (unsigned int i = 0; i < handlers_.size(); ++i)
     
    183183    }
    184184
    185     FORCEINLINE void InputState::update(float dt, unsigned int device)
     185    ORX_FORCEINLINE void InputState::update(float dt, unsigned int device)
    186186    {
    187187        switch (device)
     
    205205
    206206    template <typename EventType, class ButtonTypeParam>
    207     FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
     207    ORX_FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
    208208    {
    209209        assert(device < handlers_.size());
     
    216216    }
    217217
    218     FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     218    ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    219219    {
    220220        if (handlers_[mouseIndex_s] != NULL)
     
    222222    }
    223223
    224     FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
     224    ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
    225225    {
    226226        if (handlers_[mouseIndex_s] != NULL)
     
    228228    }
    229229
    230     FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
     230    ORX_FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
    231231    {
    232232        assert(device < handlers_.size());
  • code/branches/ois_update/src/libraries/tools/BulletConversions.h

    r5781 r7621  
    4343    struct ConverterExplicit<orxonox::Vector3, btVector3>
    4444    {
    45         FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input)
     45        ORX_FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input)
    4646        {
    4747            output->setX(input.x);
     
    5656    struct ConverterExplicit<btVector3, orxonox::Vector3>
    5757    {
    58         FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input)
     58        ORX_FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input)
    5959        {
    6060            output->x = input.x();
     
    6969    struct ConverterExplicit<orxonox::Quaternion, btQuaternion>
    7070    {
    71         FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
     71        ORX_FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
    7272        {
    7373            output->setW(input.w);
     
    8383    struct ConverterExplicit<btQuaternion, orxonox::Quaternion>
    8484    {
    85         FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
     85        ORX_FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
    8686        {
    8787            output->w = input.w();
  • code/branches/ois_update/src/libraries/util/Convert.h

    r7401 r7621  
    143143    struct ConverterFallback
    144144    {
    145         FORCEINLINE static bool convert(ToType* output, const FromType& input)
     145        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
    146146        {
    147147            COUT(2) << "Could not convert value of type " << typeid(FromType).name()
     
    155155    struct ConverterFallback<FromType*, ToType*>
    156156    {
    157         FORCEINLINE static bool convert(ToType** output, FromType* const input)
     157        ORX_FORCEINLINE static bool convert(ToType** output, FromType* const input)
    158158        {
    159159            ToType* temp = dynamic_cast<ToType*>(input);
     
    182182struct ConverterStringStream
    183183{
    184     FORCEINLINE static bool convert(ToType* output, const FromType& input)
     184    ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
    185185    {
    186186        return orxonox::ConverterFallback<FromType, ToType>::convert(output, input);
     
    198198    /// Fallback operator <<() (delegates to orxonox::ConverterFallback)
    199199    template <class FromType>
    200     FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
     200    ORX_FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
    201201    {
    202202        std::string temp;
     
    215215struct ConverterStringStream<FromType, std::string>
    216216{
    217     FORCEINLINE static bool convert(std::string* output, const FromType& input)
     217    ORX_FORCEINLINE static bool convert(std::string* output, const FromType& input)
    218218    {
    219219        using namespace fallbackTemplates;
     
    241241    /// Fallback operator >>() (delegates to orxonox::ConverterFallback)
    242242    template <class ToType>
    243     FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
     243    ORX_FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
    244244    {
    245245        std::string input(static_cast<std::istringstream&>(instream).str());
     
    252252struct ConverterStringStream<std::string, ToType>
    253253{
    254     FORCEINLINE static bool convert(ToType* output, const std::string& input)
     254    ORX_FORCEINLINE static bool convert(ToType* output, const std::string& input)
    255255    {
    256256        using namespace fallbackTemplates;
     
    276276    /// %Template delegates to ::ConverterStringStream
    277277    template <class FromType, class ToType>
    278     FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
     278    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
    279279    {
    280280        return ConverterStringStream<FromType, ToType>::convert(output, input);
     
    283283    /// Makes an implicit cast from \a FromType to \a ToType
    284284    template <class FromType, class ToType>
    285     FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
     285    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
    286286    {
    287287        (*output) = static_cast<ToType>(input);
     
    303303    {
    304304        enum { probe = ImplicitConversion<FromType, ToType>::exists };
    305         FORCEINLINE static bool convert(ToType* output, const FromType& input)
     305        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
    306306        {
    307307            // Use the probe's value to delegate to the right function
     
    327327    */
    328328    template <class FromType, class ToType>
    329     FORCEINLINE bool convertValue(ToType* output, const FromType& input)
     329    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input)
    330330    {
    331331        return ConverterExplicit<FromType, ToType>::convert(output, input);
     
    348348    */
    349349    template<class FromType, class ToType>
    350     FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
     350    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
    351351    {
    352352        if (convertValue(output, input))
     
    361361    /// Directly returns the converted value, but uses the fallback on failure. @see convertValue
    362362    template<class FromType, class ToType>
    363     FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
     363    ORX_FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
    364364    {
    365365        ToType output;
     
    380380    */
    381381    template<class ToType, class FromType>
    382     FORCEINLINE ToType multi_cast(const FromType& input)
     382    ORX_FORCEINLINE ToType multi_cast(const FromType& input)
    383383    {
    384384        ToType output;
     
    395395    struct ConverterExplicit<const char*, ToType>
    396396    {
    397         FORCEINLINE static bool convert(ToType* output, const char* input)
     397        ORX_FORCEINLINE static bool convert(ToType* output, const char* input)
    398398        {
    399399            return convertValue<std::string, ToType>(output, input);
     
    405405    struct ConverterExplicit<char, std::string>
    406406    {
    407         FORCEINLINE static bool convert(std::string* output, const char input)
     407        ORX_FORCEINLINE static bool convert(std::string* output, const char input)
    408408        {
    409409            *output = input;
     
    415415    struct ConverterExplicit<unsigned char, std::string>
    416416    {
    417         FORCEINLINE static bool convert(std::string* output, const unsigned char input)
     417        ORX_FORCEINLINE static bool convert(std::string* output, const unsigned char input)
    418418        {
    419419            *output = input;
     
    425425    struct ConverterExplicit<std::string, char>
    426426    {
    427         FORCEINLINE static bool convert(char* output, const std::string& input)
     427        ORX_FORCEINLINE static bool convert(char* output, const std::string& input)
    428428        {
    429429            if (!input.empty())
     
    438438    struct ConverterExplicit<std::string, unsigned char>
    439439    {
    440         FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
     440        ORX_FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
    441441        {
    442442            if (!input.empty())
     
    453453    struct ConverterExplicit<bool, std::string>
    454454    {
    455         FORCEINLINE static bool convert(std::string* output, const bool& input)
     455        ORX_FORCEINLINE static bool convert(std::string* output, const bool& input)
    456456        {
    457457            if (input)
  • code/branches/ois_update/src/libraries/util/MathConvert.h

    r7401 r7621  
    5151    struct ConverterExplicit<orxonox::Vector2, std::string>
    5252    {
    53         FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
     53        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
    5454        {
    5555            std::ostringstream ostream;
     
    6767    struct ConverterExplicit<orxonox::Vector3, std::string>
    6868    {
    69         FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
     69        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
    7070        {
    7171            std::ostringstream ostream;
     
    8383    struct ConverterExplicit<orxonox::Vector4, std::string>
    8484    {
    85         FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
     85        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
    8686        {
    8787            std::ostringstream ostream;
     
    9999    struct ConverterExplicit<orxonox::Quaternion, std::string>
    100100    {
    101         FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
     101        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
    102102        {
    103103            std::ostringstream ostream;
     
    115115    struct ConverterExplicit<orxonox::ColourValue, std::string>
    116116    {
    117         FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
     117        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
    118118        {
    119119            std::ostringstream ostream;
     
    157157    struct ConverterFallback<orxonox::Radian, ToType>
    158158    {
    159         FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
     159        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
    160160        {
    161161            return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
     
    167167    struct ConverterFallback<orxonox::Degree, ToType>
    168168    {
    169         FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
     169        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
    170170        {
    171171            return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
     
    177177    struct ConverterFallback<FromType, orxonox::Radian>
    178178    {
    179         FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
     179        ORX_FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
    180180        {
    181181            float temp;
     
    194194    struct ConverterFallback<FromType, orxonox::Degree>
    195195    {
    196         FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
     196        ORX_FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
    197197        {
    198198            float temp;
  • code/branches/ois_update/src/libraries/util/SharedPtr.h

    r7514 r7621  
    187187        _UtilExport SmallObjectAllocator& createSharedCounterPool();
    188188
    189         FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
     189        ORX_FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
    190190        {
    191191            static SmallObjectAllocator& instance = createSharedCounterPool();
Note: See TracChangeset for help on using the changeset viewer.