Commit 504da729 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

hack to pass t_symbol->s_name to gem::any

gem::any doesn't really like "const" pointers, as they are cast to "void*".
LATER make this const-safe
parent e19ed570
......@@ -36,7 +36,8 @@ static gem::any atom2any(t_atom*ap)
result=atom_getfloat(ap);
break;
case A_SYMBOL:
result=atom_getsymbol(ap)->s_name;
#warning gem::any doesnt like "const char*"
result=const_cast<char*>(atom_getsymbol(ap)->s_name);
break;
default:
result=ap->a_w.w_gpointer;
......
......@@ -1081,7 +1081,8 @@ void pix_freeframe :: parmMess(std::string key, t_atom *value)
v=atom_getfloat(value);
break;
case (A_SYMBOL):
v=atom_getsymbol(value)->s_name;
#warning gem::any doesnt like "const char*"
v=const_cast<char*>(atom_getsymbol(value)->s_name);
break;
default:
return;
......
......@@ -55,7 +55,8 @@ public:
result=atom_getfloat(ap);
break;
case A_SYMBOL:
result=atom_getsymbol(ap)->s_name;
#warning gem::any doesnt like "const char*"
result=const_cast<char*>(atom_getsymbol(ap)->s_name);
break;
default:
result=ap->a_w.w_gpointer;
......
......@@ -556,7 +556,8 @@ static gem::any atom2any(t_atom*ap)
result=atom_getfloat(ap);
break;
case A_SYMBOL:
result=atom_getsymbol(ap)->s_name;
#warning gem::any doesnt like "const char*"
result=const_cast<char*>(atom_getsymbol(ap)->s_name);
break;
default:
result=ap->a_w.w_gpointer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment