mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-09 09:37:17 -04:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user