[Gridflow-cvs] [svn] commit: r5670 - in /trunk/src: classes1.cxx grid.cxx source_filter.rb

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed May 12 19:22:50 EDT 2010


Author: matju
Date: Wed May 12 19:22:50 2010
New Revision: 5670

Log:
use TO() instead of convert()

Modified:
    trunk/src/classes1.cxx
    trunk/src/grid.cxx
    trunk/src/source_filter.rb

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Wed May 12 19:22:50 2010
@@ -536,11 +536,11 @@
 	pd_list((t_pd *)bself,&s_list,2,a);
 }
 \def 1 put_at (...) {
-	if (argv[0].a_type==A_LIST) put_at=convert(argv[0],(Grid **)0);
+	if (argv[0].a_type==A_LIST) put_at=TO(Grid *,argv[0]);
 	else {
 		put_at=new Grid(Dim(argc),int32_e);
 		int32 *v = (int32 *)*put_at;
-		for (int i=0; i<argc; i++) v[i]=convert(argv[i],(int32 *)0);
+		for (int i=0; i<argc; i++) v[i]=TO(int32,argv[i]);
 	}
 }
 \end class {install("#store",2,1); add_creator("@store");}

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Wed May 12 19:22:50 2010
@@ -47,7 +47,7 @@
 		if (a[i] == s_sharp) {
 			int32 v[i];
 			if (i!=0 && a[i-1].a_type==A_SYMBOL) nt=NumberTypeE_find(a[--i]);
-			for (int j=0; j<i; j++) v[j] = convert(a[j],(int32*)0);
+			for (int j=0; j<i; j++) v[j] = TO(int32,a[j]);
 			init(Dim(i,v),nt);
 			CHECK_ALIGN(this->data,nt);
 			if (a[i] != s_sharp) i++;

Modified: trunk/src/source_filter.rb
==============================================================================
--- trunk/src/source_filter.rb (original)
+++ trunk/src/source_filter.rb Wed May 12 19:22:50 2010
@@ -155,7 +155,7 @@
 	m.args.each_with_index{|arg,i|
 		Out.print "," if i>0 or m.maxargs==-1
 		Out.print "argc<#{i+1}?#{arg.default}:" if arg.default
-		Out.print "convert(argv[#{i}],(#{arg.type}*)0)"
+		Out.print "TO(#{arg.type},argv[#{i}])"
 	}
 	Out.print ");DEF_OUT;}"
 end



More information about the Gridflow-cvs mailing list