Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2009, 6:22:15 PM (15 years ago)
Author:
rgrieder
Message:

Added a few inline keywords to template functions (Visual Studio does not seem to inline the small ones if defined outside of the class)
Added FORCEINLINE (which expands to forceinline for msvc) to all conversion functions (except the larger ones of course).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/util/MathConvert.h

    r2171 r3145  
    5050    struct ConverterExplicit<orxonox::Vector2, std::string>
    5151    {
    52         static bool convert(std::string* output, const orxonox::Vector2& input)
     52        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
    5353        {
    5454            std::ostringstream ostream;
     
    6666    struct ConverterExplicit<orxonox::Vector3, std::string>
    6767    {
    68         static bool convert(std::string* output, const orxonox::Vector3& input)
     68        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
    6969        {
    7070            std::ostringstream ostream;
     
    8282    struct ConverterExplicit<orxonox::Vector4, std::string>
    8383    {
    84         static bool convert(std::string* output, const orxonox::Vector4& input)
     84        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
    8585        {
    8686            std::ostringstream ostream;
     
    9898    struct ConverterExplicit<orxonox::Quaternion, std::string>
    9999    {
    100         static bool convert(std::string* output, const orxonox::Quaternion& input)
     100        FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
    101101        {
    102102            std::ostringstream ostream;
     
    114114    struct ConverterExplicit<orxonox::ColourValue, std::string>
    115115    {
    116         static bool convert(std::string* output, const orxonox::ColourValue& input)
     116        FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
    117117        {
    118118            std::ostringstream ostream;
     
    156156    struct ConverterFallback<orxonox::Radian, ToType>
    157157    {
    158         static bool convert(ToType* output, const orxonox::Radian& input)
     158        FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
    159159        {
    160160            return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
     
    166166    struct ConverterFallback<orxonox::Degree, ToType>
    167167    {
    168         static bool convert(ToType* output, const orxonox::Degree& input)
     168        FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
    169169        {
    170170            return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
     
    176176    struct ConverterFallback<FromType, orxonox::Radian>
    177177    {
    178         static bool convert(orxonox::Radian* output, const FromType& input)
     178        FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
    179179        {
    180180            float temp;
     
    193193    struct ConverterFallback<FromType, orxonox::Degree>
    194194    {
    195         static bool convert(orxonox::Degree* output, const FromType& input)
     195        FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
    196196        {
    197197            float temp;
Note: See TracChangeset for help on using the changeset viewer.