Commit 0db93e29 authored by zmoelnig's avatar zmoelnig
Browse files

reinterpret_cast<t_method>

converted all the CCASTs to C++CASTS with:
for i in *.cpp
do
  sed -e 's|(t_method) *\([^ ]*\)\([,)]\)|reinterpret_cast<t_method>(\1)\2|' -i "${i}"
done

git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@3059 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent ecbfb5f5
......@@ -85,7 +85,7 @@ void shearZY :: shearMess(float val)
/////////////////////////////////////////////////////////
void shearZY :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&shearZY::shearMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&shearZY::shearMessCallback),
gensym("shearVal"), A_FLOAT, A_NULL);
}
void shearZY :: shearMessCallback(void *data, t_floatarg val)
......
......@@ -88,7 +88,7 @@ void shininess :: shininessMess(float val)
/////////////////////////////////////////////////////////
void shininess :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&shininess::shininessMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&shininess::shininessMessCallback),
gensym("shininess"), A_FLOAT, A_NULL);
}
void shininess :: shininessMessCallback(void *data, t_floatarg val)
......
......@@ -89,7 +89,7 @@ void specular :: specularMess(float red, float green, float blue, float alpha)
/////////////////////////////////////////////////////////
void specular :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&specular::specularMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&specular::specularMessCallback),
gensym("specular"), A_GIMME, A_NULL);
}
void specular :: specularMessCallback(void *data, t_symbol *, int argc, t_atom *argv)
......
......@@ -135,13 +135,13 @@ void specularRGB :: aMess(float val)
/////////////////////////////////////////////////////////
void specularRGB :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&specularRGB::rMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&specularRGB::rMessCallback),
gensym("rVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&specularRGB::gMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&specularRGB::gMessCallback),
gensym("gVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&specularRGB::bMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&specularRGB::bMessCallback),
gensym("bVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&specularRGB::aMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&specularRGB::aMessCallback),
gensym("aVal"), A_FLOAT, A_NULL);
}
void specularRGB :: rMessCallback(void *data, t_floatarg val)
......
......@@ -92,9 +92,9 @@ void translate :: vectorMess(float x, float y, float z)
/////////////////////////////////////////////////////////
void translate :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&translate::distanceMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&translate::distanceMessCallback),
gensym("ft1"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&translate::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&translate::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void translate :: distanceMessCallback(void *data, t_floatarg distance)
......
......@@ -101,11 +101,11 @@ void translateXYZ :: zMess(float val)
/////////////////////////////////////////////////////////
void translateXYZ :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&translateXYZ::xMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&translateXYZ::xMessCallback),
gensym("xVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&translateXYZ::yMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&translateXYZ::yMessCallback),
gensym("yVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&translateXYZ::zMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&translateXYZ::zMessCallback),
gensym("zVal"), A_FLOAT, A_NULL);
}
void translateXYZ :: xMessCallback(void *data, t_floatarg val)
......
......@@ -411,13 +411,13 @@ void vertex_program :: printInfo()
/////////////////////////////////////////////////////////
void vertex_program :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&vertex_program::openMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&vertex_program::openMessCallback),
gensym("open"), A_SYMBOL, A_NULL);
class_addmethod(classPtr, (t_method)&vertex_program::printMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&vertex_program::printMessCallback),
gensym("print"), A_NULL);
class_addmethod(classPtr, (t_method)&vertex_program::paramMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&vertex_program::paramMessCallback),
gensym("parameter"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT,A_NULL);
class_addmethod(classPtr, (t_method)&vertex_program::paramMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&vertex_program::paramMessCallback),
gensym("param"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT,A_NULL);
}
void vertex_program :: openMessCallback(void *data, t_symbol *filename)
......
......@@ -133,7 +133,7 @@ void spot_light :: render(GemState *state)
/////////////////////////////////////////////////////////
void spot_light :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&spot_light::lightParamMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&spot_light::lightParamMessCallback),
gensym("paramlist"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void spot_light :: lightParamMessCallback(void *data, t_floatarg linAtt, t_floatarg cutoff, t_floatarg exponent)
......
......@@ -179,11 +179,11 @@ void world_light :: render(GemState *state)
/////////////////////////////////////////////////////////
void world_light :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&world_light::lightColorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&world_light::lightColorMessCallback),
gensym("clrlist"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&world_light::debugMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&world_light::debugMessCallback),
gensym("debug"), A_FLOAT, A_NULL);
class_addfloat(classPtr, (t_method)&world_light::lightOnOffMessCallback);
class_addfloat(classPtr, reinterpret_cast<t_method>(&world_light::lightOnOffMessCallback));
}
void world_light :: lightColorMessCallback(void *data, t_symbol*,int argc, t_atom*argv)
{
......
......@@ -99,7 +99,7 @@ gemglutwindow :: gemglutwindow(void) :
m_width =500;
m_height=500;
m_clock=clock_new(this, (t_method)gemglutwindow::clockCallback);
m_clock=clock_new(this, reinterpret_cast<t_method>(gemglutwindow::clockCallback));
}
/////////////////////////////////////////////////////////
......@@ -357,19 +357,19 @@ void gemglutwindow :: obj_setupCallback(t_class *classPtr)
}
firsttime=false;
class_addbang(classPtr, (t_method)&gemglutwindow::renderMessCallback);
class_addbang(classPtr, reinterpret_cast<t_method>(&gemglutwindow::renderMessCallback));
class_addmethod(classPtr, (t_method)&gemglutwindow::titleMessCallback, gensym("title"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::createMessCallback, gensym("create") ,A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::bufferMessCallback, gensym("buffer"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::fullscreenMessCallback, gensym("fullscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::dimensionsMessCallback, gensym("dimen"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::offsetMessCallback, gensym("offset"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::cursorMessCallback, gensym("cursor"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::destroyMessCallback, gensym("destroy"), A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::printMessCallback, gensym("print"), A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::borderMessCallback, gensym("border"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemglutwindow::fsaaMessCallback, gensym("FSAA"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::titleMessCallback), gensym("title"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::createMessCallback), gensym("create") ,A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::bufferMessCallback), gensym("buffer"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::fullscreenMessCallback), gensym("fullscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::dimensionsMessCallback), gensym("dimen"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::offsetMessCallback), gensym("offset"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::cursorMessCallback), gensym("cursor"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::destroyMessCallback), gensym("destroy"), A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::printMessCallback), gensym("print"), A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::borderMessCallback), gensym("border"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemglutwindow::fsaaMessCallback), gensym("FSAA"), A_FLOAT, A_NULL);
}
void gemglutwindow :: printMessCallback(void *)
{
......
......@@ -248,23 +248,23 @@ void gemwindow :: menuBarMess(int on)
/////////////////////////////////////////////////////////
void gemwindow :: obj_setupCallback(t_class *classPtr)
{
class_addbang(classPtr, (t_method)&gemwindow::bangMessCallback);
class_addmethod(classPtr, (t_method)&gemwindow::renderMessCallback, gensym("render"), A_NULL);
class_addbang(classPtr, reinterpret_cast<t_method>(&gemwindow::bangMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::renderMessCallback), gensym("render"), A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::titleMessCallback, gensym("title"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::createMessCallback, gensym("create"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::bufferMessCallback, gensym("buffer"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::fullscreenMessCallback, gensym("fullscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::menuBarMessCallback, gensym("menubar"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::secondscreenMessCallback, gensym("secondscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::dimensionsMessCallback, gensym("dimen"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::offsetMessCallback, gensym("offset"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::cursorMessCallback, gensym("cursor"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::destroyMessCallback, gensym("destroy"), A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::printMessCallback, gensym("print"), A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::borderMessCallback, gensym("border"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::topmostMessCallback, gensym("topmost"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&gemwindow::fsaaMessCallback, gensym("FSAA"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::titleMessCallback), gensym("title"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::createMessCallback), gensym("create"), A_DEFSYM ,A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::bufferMessCallback), gensym("buffer"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::fullscreenMessCallback), gensym("fullscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::menuBarMessCallback), gensym("menubar"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::secondscreenMessCallback), gensym("secondscreen"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::dimensionsMessCallback), gensym("dimen"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::offsetMessCallback), gensym("offset"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::cursorMessCallback), gensym("cursor"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::destroyMessCallback), gensym("destroy"), A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::printMessCallback), gensym("print"), A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::borderMessCallback), gensym("border"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::topmostMessCallback), gensym("topmost"), A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&gemwindow::fsaaMessCallback), gensym("FSAA"), A_FLOAT, A_NULL);
}
void gemwindow :: printMessCallback(void *)
{
......
......@@ -90,9 +90,9 @@ void part_color :: color2Mess(float red, float green, float blue, float alpha)
/////////////////////////////////////////////////////////
void part_color :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_color::color1MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_color::color1MessCallback),
gensym("color1"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&part_color::color2MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_color::color2MessCallback),
gensym("color2"), A_GIMME, A_NULL);
}
void part_color :: color1MessCallback(void *data, t_symbol*s, int argc, t_atom*argv)
......
......@@ -71,7 +71,7 @@ void part_damp :: vectorMess(float x, float y, float z)
/////////////////////////////////////////////////////////
void part_damp :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_damp::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_damp::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void part_damp :: vectorMessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
......
......@@ -88,7 +88,7 @@ void part_draw :: typeMess(int ac,t_atom* av)
/////////////////////////////////////////////////////////
void part_draw :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_draw::typeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_draw::typeMessCallback),
gensym("draw"), A_GIMME, A_NULL);
}
void part_draw :: typeMessCallback(void *data, t_symbol *s, int ac,t_atom* av)
......
......@@ -59,7 +59,7 @@ void part_follow :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_follow :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_follow::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_follow::numberMessCallback),
gensym("accel"), A_FLOAT, A_NULL);
}
void part_follow :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -71,7 +71,7 @@ void part_gravity :: vectorMess(float x, float y, float z)
/////////////////////////////////////////////////////////
void part_gravity :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_gravity::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_gravity::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void part_gravity :: vectorMessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
......
......@@ -76,7 +76,7 @@ void part_head :: speedMess(float speed)
/////////////////////////////////////////////////////////
void part_head :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_head::speedMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_head::speedMessCallback),
gensym("speed"), A_FLOAT, A_NULL);
}
void part_head :: speedMessCallback(void *data, t_floatarg speed)
......
......@@ -59,7 +59,7 @@ void part_killold :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_killold :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_killold::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_killold::numberMessCallback),
gensym("age"), A_FLOAT, A_NULL);
}
void part_killold :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -59,7 +59,7 @@ void part_killslow :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_killslow :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_killslow::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_killslow::numberMessCallback),
gensym("speed"), A_FLOAT, A_NULL);
}
void part_killslow :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -64,9 +64,9 @@ void part_orbitpoint :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_orbitpoint :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_orbitpoint::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_orbitpoint::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_orbitpoint::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_orbitpoint::numberMessCallback),
gensym("grav"), A_FLOAT, A_NULL);
}
void part_orbitpoint :: numberMessCallback(void *data, t_floatarg num)
......
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