ZynAddSubFX: workaround for bug in Win64 GCC

When building LMMS with recent stable versions of GCC it generates
wrong code for the implicit REALTYPE specialization of the template
method stringFrom<T>() (problem in std::stringstream implementation).
By writing a custom template specialization which uses sprintf() the
bug can be circumvented.
This commit is contained in:
Tobias Doerffel
2012-02-02 20:21:03 +01:00
parent 2900e13dac
commit 2e7e09fd6b

View File

@@ -54,6 +54,15 @@ std::string stringFrom(T x)
return ss.str();
}
template<class T>
std::string stringFrom(REALTYPE x)
{
char buf[64];
sprintf( buf, "%f", x );
return buf;
}
template<class T>
T stringTo(const char *x)
{