Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2010, 3:05:53 PM (14 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.