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
......@@ -115,9 +115,9 @@ void part_render :: sizeMess(int state)
/////////////////////////////////////////////////////////
void part_render :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_render::colorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_render::colorMessCallback),
gensym("colorize"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_render::sizeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_render::sizeMessCallback),
gensym("size"), A_FLOAT, A_NULL);
}
void part_render :: colorMessCallback(void *data, t_floatarg f)
......
......@@ -97,11 +97,11 @@ void part_sink :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_sink :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_sink::killMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_sink::killMessCallback),
gensym("kill"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_sink::domainMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_sink::domainMessCallback),
gensym("domain"), A_SYMBOL, A_NULL);
class_addmethod(classPtr, (t_method)&part_sink::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_sink::vectorMessCallback),
gensym("vector"), A_GIMME, A_NULL);
}
void part_sink :: killMessCallback(void *data, t_floatarg num)
......
......@@ -74,7 +74,7 @@ void part_size :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_size :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_size::sizeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_size::sizeMessCallback),
gensym("size"), A_GIMME, A_NULL);
}
void part_size :: sizeMessCallback(void *data, t_symbol*s, int argc, t_atom*argv)
......
......@@ -88,11 +88,11 @@ void part_source :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_source :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_source::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_source::numberMessCallback),
gensym("numToAdd"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_source::domainMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_source::domainMessCallback),
gensym("domain"), A_SYMBOL, A_NULL);
class_addmethod(classPtr, (t_method)&part_source::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_source::vectorMessCallback),
gensym("vector"), A_GIMME, A_NULL);
}
void part_source :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -99,9 +99,9 @@ void part_targetcolor :: colorMess(float red, float green, float blue, float alp
/////////////////////////////////////////////////////////
void part_targetcolor :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_targetcolor::colorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_targetcolor::colorMessCallback),
gensym("color"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&part_targetcolor::scaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_targetcolor::scaleMessCallback),
gensym("ft1"), A_FLOAT, A_NULL);
}
void part_targetcolor :: colorMessCallback(void *data, t_symbol *, int argc, t_atom *argv)
......
......@@ -93,9 +93,9 @@ void part_targetsize :: scaleMess(float scaleX,float scaleY,float scaleZ)
/////////////////////////////////////////////////////////
void part_targetsize :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_targetsize::sizeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_targetsize::sizeMessCallback),
gensym("ft1"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&part_targetsize::scaleMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_targetsize::scaleMessCallback),
gensym("ft2"), A_GIMME, A_NULL);
}
void part_targetsize :: sizeMessCallback(void *data, t_symbol*s, int argc, t_atom *argv)
......
......@@ -63,9 +63,9 @@ void part_velcone :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_velcone :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_velcone::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velcone::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_velcone::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velcone::numberMessCallback),
gensym("vel"), A_FLOAT, A_NULL);
}
void part_velcone :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -87,9 +87,9 @@ void part_velocity :: vectorMess(int argc, t_atom*argv){
/////////////////////////////////////////////////////////
void part_velocity :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_velocity::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velocity::vectorMessCallback),
gensym("vector"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&part_velocity::domainMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velocity::domainMessCallback),
gensym("domain"), A_SYMBOL, A_NULL);
}
void part_velocity :: domainMessCallback(void *data, t_symbol*s)
......
......@@ -64,9 +64,9 @@ void part_velsphere :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_velsphere :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_velsphere::vectorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velsphere::vectorMessCallback),
gensym("vector"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&part_velsphere::numberMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_velsphere::numberMessCallback),
gensym("vel"), A_FLOAT, A_NULL);
}
void part_velsphere :: numberMessCallback(void *data, t_floatarg num)
......
......@@ -56,7 +56,7 @@ void part_vertex :: render(GemState *state)
/////////////////////////////////////////////////////////
void part_vertex :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&part_vertex::posMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&part_vertex::posMessCallback),
gensym(""), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void part_vertex :: posMessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
......
......@@ -96,9 +96,9 @@ void pix_a_2grey :: obj_setupCallback(t_class *classPtr)
{
class_addcreator((t_newmethod)create_pix_a_2grey,
gensym("pix_a_2gray"), A_NULL);
class_addmethod(classPtr, (t_method)&pix_a_2grey::alphaMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_a_2grey::alphaMessCallback),
gensym("ft1"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_a_2grey::alphaMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_a_2grey::alphaMessCallback),
gensym("alpha"), A_FLOAT, A_NULL);
}
......
......@@ -221,13 +221,13 @@ void pix_aging :: scratchMess(int scratchlines)
/////////////////////////////////////////////////////////
void pix_aging :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_aging::colorMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_aging::colorMessCallback),
gensym("coloraging"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_aging::scratchMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_aging::scratchMessCallback),
gensym("scratch"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_aging::dustMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_aging::dustMessCallback),
gensym("dust"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_aging::pitsMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_aging::pitsMessCallback),
gensym("pits"), A_FLOAT, A_NULL);
}
......
......@@ -119,14 +119,14 @@ void pix_alpha :: otheralphaMess(float alpha)
/////////////////////////////////////////////////////////
void pix_alpha :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_alpha::alphaMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_alpha::alphaMessCallback),
gensym("ft1"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_alpha::otheralphaMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_alpha::otheralphaMessCallback),
gensym("ft2"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_alpha::highThreshMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_alpha::highThreshMessCallback),
gensym("high_val"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_alpha::lowThreshMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_alpha::lowThreshMessCallback),
gensym("low_val"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void pix_alpha :: highThreshMessCallback(void *data, t_floatarg red, t_floatarg green, t_floatarg blue)
......
......@@ -555,12 +555,12 @@ void pix_background :: rangeNMess(int argc, t_atom*argv){
/////////////////////////////////////////////////////////
void pix_background :: obj_setupCallback(t_class *classPtr)
{
class_addbang(classPtr, (t_method)&pix_background::resetCallback);
class_addmethod(classPtr, (t_method)&pix_background::rangeNCallback,
class_addbang(classPtr, reinterpret_cast<t_method>(&pix_background::resetCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_background::rangeNCallback),
gensym("range_n"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&pix_background::rangeCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_background::rangeCallback),
gensym("range"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_background::resetCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_background::resetCallback),
gensym("reset"), A_NULL);
}
......
......@@ -710,11 +710,11 @@ void pix_backlight :: processGrayImage(imageStruct &image)
/////////////////////////////////////////////////////////
void pix_backlight :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_backlight::scaleCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_backlight::scaleCallback),
gensym("scale"), A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_backlight::floorCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_backlight::floorCallback),
gensym("floor"), A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_backlight::ceilingCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_backlight::ceilingCallback),
gensym("ceiling"), A_DEFFLOAT, A_NULL);
}
void pix_backlight :: scaleCallback(void *data, t_floatarg m_SpikeScale)
......
......@@ -623,12 +623,12 @@ void pix_biquad :: faktorMess(int argc, t_atom*argv){
/////////////////////////////////////////////////////////
void pix_biquad :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_biquad::setMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_biquad::setMessCallback),
gensym("set"), A_NULL);
class_addmethod(classPtr, (t_method)&pix_biquad::modeMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_biquad::modeMessCallback),
gensym("mode"), A_DEFFLOAT, A_NULL);
class_addlist(classPtr, (t_method)&pix_biquad::faktorMessCallback);
class_addlist(classPtr, reinterpret_cast<t_method>(&pix_biquad::faktorMessCallback));
}
void pix_biquad :: faktorMessCallback(void *data, t_symbol *s, int argc, t_atom* argv)
......
......@@ -177,9 +177,9 @@ void pix_bitmask :: intMaskMess(int mask)
/////////////////////////////////////////////////////////
void pix_bitmask :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_bitmask::vecMaskMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_bitmask::vecMaskMessCallback),
gensym("vec_mask"), A_GIMME, A_NULL);
class_addmethod(classPtr, (t_method)&pix_bitmask::floatMaskMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_bitmask::floatMaskMessCallback),
gensym("ft1"), A_FLOAT, A_NULL);
}
void pix_bitmask :: vecMaskMessCallback(void *data, t_symbol *, int argc, t_atom *argv)
......
......@@ -233,10 +233,10 @@ void pix_blob :: GainMess(int argc, t_atom *argv)
/////////////////////////////////////////////////////////
void pix_blob :: obj_setupCallback(t_class *classPtr)
{
// class_addbang(classPtr, (t_method)&pix_blob::triggerMessCallback);
class_addmethod(classPtr, (t_method)&pix_blob::channelMessCallback,
// class_addbang(classPtr, reinterpret_cast<t_method>(&pix_blob::triggerMessCallback));
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_blob::channelMessCallback),
gensym("channel"), A_FLOAT, A_NULL);
class_addmethod(classPtr, (t_method)&pix_blob::gainMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_blob::gainMessCallback),
gensym("gain"), A_GIMME, A_NULL);
}
......
......@@ -396,7 +396,7 @@ unsigned short rightGain,imageGain;
void pix_blur :: obj_setupCallback(t_class *classPtr)
{
class_addmethod(classPtr, (t_method)&pix_blur::blurCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_blur::blurCallback),
gensym("blur"), A_DEFFLOAT, A_NULL);
}
......
......@@ -92,7 +92,7 @@ void pix_buf :: obj_setupCallback(t_class *classPtr)
class_addcreator((t_newmethod)create_pix_buf,
gensym("pix_separator"), A_DEFFLOAT, A_NULL);
class_addbang(classPtr, &pix_buf::bangMessCallback);
class_addmethod(classPtr, (t_method)&pix_buf::autoMessCallback,
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_buf::autoMessCallback),
gensym("auto"), A_FLOAT, A_NULL);
}
......
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