Ignore:
Timestamp:
Mar 2, 2012, 2:00:45 PM (11 years ago)
Author:
gary
Message:

math: minor compilation fixes for Visual Studio. Still does not link.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/math/vector.h

    r1148 r1149  
    9595    inline T const& operator[](int n) const { return *(&this->x + n); } \
    9696    \
    97     void printf() const; \
     97    /* Visual Studio insists on having an assignment operator. */ \
     98    inline tname<T> const & operator =(tname<T> const &that) \
     99    { \
     100        for (size_t n = 0; n < sizeof(*this) / sizeof(T); n++) \
     101            (*this)[n] = that[n]; \
     102        return *this; \
     103    } \
    98104    \
    99105    template<typename U> \
     
    104110            ret[n] = static_cast<U>((*this)[n]); \
    105111        return ret; \
    106     }
     112    } \
     113    \
     114    void printf() const;
    107115
    108116/*
Note: See TracChangeset for help on using the changeset viewer.