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
......@@ -322,13 +322,13 @@ void multimodel :: changeModel(int modelNum)
/////////////////////////////////////////////////////////
void multimodel :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&multimodel::openMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&multimodel::openMessCallback),
gensym("open"), A_SYMBOL, A_FLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&multimodel::changeModelCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&multimodel::changeModelCallback),
gensym("mdl_num"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&multimodel::rescaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&multimodel::rescaleMessCallback),
gensym("rescale"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&multimodel::textureMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&multimodel::textureMessCallback),
gensym("texture"), A_FLOAT, A_NULL);
}
void multimodel :: openMessCallback(void *data, t_symbol *filename, t_floatarg baseModel,
......
......@@ -754,7 +754,7 @@ void newWave :: obj_setupCallback(t_class *classPtr)
gensym("force"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&newWave::positionMessCallback),
gensym("position"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addbang(classPtr, (t_method)&newWave::bangMessCallback);
class_addbang(classPtr, reinterpret_cast<t_method>(&newWave::bangMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&newWave::noiseMessCallback),
gensym("noise"), A_FLOAT, A_NULL);
}
......
......@@ -246,9 +246,9 @@ void polygon :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void polygon :: obj_setupCallback(t_class *classPtr)
{
class_addlist(classPtr, (t_method)&polygon::listCallback);
class_addmethod(classPtr, (t_method)&polygon::vertexCallback, gensym("vertex"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addanything(classPtr, (t_method)&polygon::vertCallback);
class_addlist(classPtr, reinterpret_cast<t_method>(&polygon::listCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&polygon::vertexCallback), gensym("vertex"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addanything(classPtr, reinterpret_cast<t_method>(&polygon::vertCallback));
}
void polygon :: listCallback(void *data, t_symbol*s, int argc, t_atom*argv)
......
......@@ -371,21 +371,21 @@ void pqtorusknots :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void pqtorusknots :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pqtorusknots::scaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::scaleMessCallback),
gensym("scale"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::stepsMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::stepsMessCallback),
gensym("steps"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::facetsMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::facetsMessCallback),
gensym("facets"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::thickMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::thickMessCallback),
gensym("thick"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::clumpMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::clumpMessCallback),
gensym("clump"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::uvScaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::uvScaleMessCallback),
gensym("uvScale"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::pqMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::pqMessCallback),
gensym("pq"), A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pqtorusknots::typeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pqtorusknots::typeMessCallback),
gensym("type"), A_SYMBOL, A_NULL);
}
......
......@@ -146,17 +146,17 @@ void primTri :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void primTri :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&primTri::vect1MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::vect1MessCallback),
gensym("vect1"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&primTri::vect2MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::vect2MessCallback),
gensym("vect2"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&primTri::vect3MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::vect3MessCallback),
gensym("vect3"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&primTri::col1MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::col1MessCallback),
gensym("col1"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&primTri::col2MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::col2MessCallback),
gensym("col2"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&primTri::col3MessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&primTri::col3MessCallback),
gensym("col3"), A_GIMME, A_NULL);
}
......
......@@ -122,7 +122,7 @@ void rectangle :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void rectangle :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&rectangle::heightMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&rectangle::heightMessCallback),
gensym("ft2"), A_FLOAT, A_NULL);
}
......
......@@ -387,12 +387,12 @@ void ripple :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void ripple :: obj_setupCallback(t_class *classPtr)
{
class_addbang(classPtr, (t_method)&ripple::bangMessCallback);
class_addmethod(classPtr, (t_method)&ripple::heightMessCallback,
class_addbang(classPtr, reinterpret_cast<t_method>(&ripple::bangMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&ripple::heightMessCallback),
gensym("Ht"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&ripple::ctrXMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ripple::ctrXMessCallback),
gensym("cX"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&ripple::ctrYMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ripple::ctrYMessCallback),
gensym("cY"), A_FLOAT, A_NULL);
}
......
......@@ -353,16 +353,16 @@ void rubber :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void rubber :: obj_setupCallback(t_class *classPtr)
{
class_addbang(classPtr, (t_method)&rubber::bangMessCallback);
class_addmethod(classPtr, (t_method)&rubber::heightMessCallback,
class_addbang(classPtr, reinterpret_cast<t_method>(&rubber::bangMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&rubber::heightMessCallback),
gensym("Ht"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&rubber::ctrXMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&rubber::ctrXMessCallback),
gensym("cX"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&rubber::ctrYMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&rubber::ctrYMessCallback),
gensym("cY"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&rubber::dragMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&rubber::dragMessCallback),
gensym("drag"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&rubber::springMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&rubber::springMessCallback),
gensym("spring"), A_FLOAT, A_NULL);
}
void rubber :: bangMessCallback(void *data)
......
......@@ -207,7 +207,7 @@ void slideSquares :: typeMess(t_symbol *type)
/////////////////////////////////////////////////////////
void slideSquares :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&slideSquares::heightMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&slideSquares::heightMessCallback),
gensym("Ht"), A_FLOAT, A_NULL);
}
......
......@@ -391,16 +391,16 @@ void sphere3d :: render(GemState *state)
/////////////////////////////////////////////////////////
void sphere3d :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&sphere3d::setCartMessCallback, gensym("set"),
class_addmethod(classPtr, reinterpret_cast<t_method>(&sphere3d::setCartMessCallback), gensym("set"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&sphere3d::setCartMessCallback, gensym("setCartesian"),
class_addmethod(classPtr, reinterpret_cast<t_method>(&sphere3d::setCartMessCallback), gensym("setCartesian"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&sphere3d::setSphMessCallback, gensym("setSpherical"),
class_addmethod(classPtr, reinterpret_cast<t_method>(&sphere3d::setSphMessCallback), gensym("setSpherical"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&sphere3d::setSphMessCallback, gensym("setSph"),
class_addmethod(classPtr, reinterpret_cast<t_method>(&sphere3d::setSphMessCallback), gensym("setSph"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&sphere3d::printMessCallback, gensym("print"),
class_addmethod(classPtr, reinterpret_cast<t_method>(&sphere3d::printMessCallback), gensym("print"),
A_NULL);
}
......
......@@ -173,7 +173,7 @@ void text2d :: render(GemState*){}
/////////////////////////////////////////////////////////
void text2d :: obj_setupCallback(t_class *classPtr )
{
class_addmethod(classPtr, (t_method)&text2d::aliasMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&text2d::aliasMessCallback),
gensym("alias"), A_FLOAT, A_NULL);
}
......
......@@ -90,7 +90,7 @@ void textextruded :: setDepth(float prec)
/////////////////////////////////////////////////////////
void textextruded :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&textextruded::depthMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&textextruded::depthMessCallback),
gensym("depth"), A_FLOAT, A_NULL);
}
void textextruded :: depthMessCallback(void *data, t_floatarg depth)
......
......@@ -178,7 +178,7 @@ void torus :: render(GemState *state)
/////////////////////////////////////////////////////////
void torus :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&torus::innerRadiusCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&torus::innerRadiusCallback),
gensym("inner"), A_FLOAT, A_NULL);
}
void torus :: innerRadiusCallback(void *data, t_floatarg radius)
......
......@@ -118,9 +118,9 @@ void trapezoid :: texscaleMess(float scale)
/////////////////////////////////////////////////////////
void trapezoid :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&trapezoid::topMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&trapezoid::topMessCallback),
gensym("top"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&trapezoid::scaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&trapezoid::scaleMessCallback),
gensym("texscale"), A_FLOAT, A_NULL);
}
......
......@@ -111,13 +111,13 @@ void accumrotate :: reset()
/////////////////////////////////////////////////////////
void accumrotate :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&accumrotate::xMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&accumrotate::xMessCallback),
gensym("xVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&accumrotate::yMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&accumrotate::yMessCallback),
gensym("yVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&accumrotate::zMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&accumrotate::zMessCallback),
gensym("zVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&accumrotate::resetCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&accumrotate::resetCallback),
gensym("reset"), A_NULL);
}
void accumrotate :: xMessCallback(void *data, t_floatarg val)
......
......@@ -129,12 +129,12 @@ void alpha :: depthtestMess(int i)
/////////////////////////////////////////////////////////
void alpha :: obj_setupCallback(t_class *classPtr)
{
class_addfloat(classPtr, (t_method)&alpha::alphaMessCallback);
class_addmethod(classPtr, (t_method)&alpha::testMessCallback,
class_addfloat(classPtr, reinterpret_cast<t_method>(&alpha::alphaMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&alpha::testMessCallback),
gensym("test"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&alpha::funMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&alpha::funMessCallback),
gensym("function"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&alpha::depthtestMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&alpha::depthtestMessCallback),
gensym("auto"), A_FLOAT, A_NULL);
}
void alpha :: alphaMessCallback(void *data, t_floatarg alphaState)
......
......@@ -87,7 +87,7 @@ void ambient :: ambientMess(float red, float green, float blue, float alpha)
/////////////////////////////////////////////////////////
void ambient :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&ambient::ambientMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ambient::ambientMessCallback),
gensym("ambient"), A_GIMME, A_NULL);
}
void ambient :: ambientMessCallback(void *data, t_symbol *, int argc, t_atom *argv)
......
......@@ -133,13 +133,13 @@ void ambientRGB :: aMess(float val)
/////////////////////////////////////////////////////////
void ambientRGB :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&ambientRGB::rMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ambientRGB::rMessCallback),
gensym("rVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&ambientRGB::gMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ambientRGB::gMessCallback),
gensym("gVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&ambientRGB::bMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ambientRGB::bMessCallback),
gensym("bVal"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&ambientRGB::aMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&ambientRGB::aMessCallback),
gensym("aVal"), A_FLOAT, A_NULL);
}
void ambientRGB :: rMessCallback(void *data, t_floatarg val)
......
......@@ -317,35 +317,35 @@ void camera :: SlideCamera(float speed)
/////////////////////////////////////////////////////////
void camera :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&camera::hAngleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::hAngleMessCallback),
gensym("hAngle"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::vAngleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::vAngleMessCallback),
gensym("vAngle"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::distanceMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::distanceMessCallback),
gensym("distance"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::speedMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::speedMessCallback),
gensym("speed"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::forwardMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::forwardMessCallback),
gensym("forward"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::reverseMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::reverseMessCallback),
gensym("reverse"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::leftMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::leftMessCallback),
gensym("left"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::rightMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::rightMessCallback),
gensym("right"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::upMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::upMessCallback),
gensym("up"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::downMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::downMessCallback),
gensym("down"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::resetMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::resetMessCallback),
gensym("reset"), A_NULL);
class_addmethod(classPtr, (t_method)&camera::modeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::modeMessCallback),
gensym("mode"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::lookXMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::lookXMessCallback),
gensym("lookX"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::lookYMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::lookYMessCallback),
gensym("lookY"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&camera::lookZMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::lookZMessCallback),
gensym("lookZ"), A_FLOAT, A_NULL);
}
void camera :: hAngleMessCallback(void *data, t_floatarg val)
......
......@@ -79,7 +79,7 @@ void color :: obj_setupCallback(t_class *classPtr)
{
class_addcreator((t_newmethod)create_color,
gensym("colour"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&color::colorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&color::colorMessCallback),
gensym("color"), A_GIMME, A_NULL);
}
void color :: colorMessCallback(void *data, t_symbol *, int argc, t_atom *argv)
......
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