simplify agg_basics.h

- remove unused/obsolete asm
 - visual studio since 2010 supports long long and we target 2014 now
This commit is contained in:
Dane Springmeyer 2014-08-30 15:39:52 -07:00
parent a8017ddae6
commit f9e11dabeb

View file

@ -89,20 +89,12 @@ namespace agg
#endif
#ifndef AGG_INT64
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define AGG_INT64 signed __int64
#else
#define AGG_INT64 signed long long
#endif
#endif
#ifndef AGG_INT64U
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define AGG_INT64U unsigned __int64
#else
#define AGG_INT64U unsigned long long
#endif
#endif
//------------------------------------------------ Some fixes for MS Visual C++
#if defined(_MSC_VER)
@ -127,50 +119,6 @@ namespace agg
typedef AGG_INT64 int64; //----int64
typedef AGG_INT64U int64u; //----int64u
#if defined(AGG_FISTP)
#pragma warning(push)
#pragma warning(disable : 4035) //Disable warning "no return value"
AGG_INLINE int iround(double v) //-------iround
{
int t;
__asm fld qword ptr [v]
__asm fistp dword ptr [t]
__asm mov eax, dword ptr [t]
}
AGG_INLINE unsigned uround(double v) //-------uround
{
unsigned t;
__asm fld qword ptr [v]
__asm fistp dword ptr [t]
__asm mov eax, dword ptr [t]
}
#pragma warning(pop)
AGG_INLINE unsigned ufloor(double v) //-------ufloor
{
return unsigned(std::floor(v));
}
AGG_INLINE unsigned uceil(double v) //--------uceil
{
return unsigned(std::ceil(v));
}
#elif defined(AGG_QIFIST)
AGG_INLINE int iround(double v)
{
return int(v);
}
AGG_INLINE int uround(double v)
{
return unsigned(v);
}
AGG_INLINE unsigned ufloor(double v)
{
return unsigned(std::floor(v));
}
AGG_INLINE unsigned uceil(double v)
{
return unsigned(std::ceil(v));
}
#else
AGG_INLINE int iround(double v)
{
return int((v < 0.0) ? v - 0.5 : v + 0.5);
@ -187,7 +135,6 @@ namespace agg
{
return unsigned(std::ceil(v));
}
#endif
//---------------------------------------------------------------saturation
template<int Limit> struct saturation