Changeset 1146 for trunk/src/half.h


Ignore:
Timestamp:
Feb 25, 2012, 2:38:49 PM (8 years ago)
Author:
sam
Message:

win32: some compilation fixes here and there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/half.h

    r1041 r1146  
    2929     * instead of calling routines with the hidden "this" parameter. */
    3030    inline half() { }
    31     inline half(int f) { *this = makefast(f); }
     31    inline half(int f) { *this = makefast((float)f); }
    3232    inline half(float f) { *this = makefast(f); }
    33     inline half(double f) { *this = makefast(f); }
     33    inline half(double f) { *this = makefast((float)f); }
    3434
    3535    inline int is_nan() const
     
    5454
    5555    /* Cast to other types -- always inline, see constructors */
    56     inline half &operator =(int f) { return *this = makefast(f); }
     56    inline half &operator =(int f) { return *this = makefast((float)f); }
    5757    inline half &operator =(float f) { return *this = makefast(f); }
    58     inline half &operator =(double f) { return *this = makefast(f); }
     58    inline half &operator =(double f) { return *this = makefast((float)f); }
    5959    inline operator int() const { return (int)tofloat(*this); }
    6060    inline operator float() const { return tofloat(*this); }
Note: See TracChangeset for help on using the changeset viewer.