[Gridflow-cvs] [svn] commit: r4028 - in /trunk: base/grid.c gridflow.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Wed Jul 16 10:24:43 EDT 2008


Author: matju
Date: Wed Jul 16 10:24:42 2008
New Revision: 4028

Log:
removed obsolete mode argument

Modified:
    trunk/base/grid.c
    trunk/gridflow.h

Modified: trunk/base/grid.c
==============================================================================
--- trunk/base/grid.c (original)
+++ trunk/base/grid.c Wed Jul 16 10:24:42 2008
@@ -149,13 +149,12 @@
 
 #define CATCH_IT catch (Barf &slimy) {post("error during flow: %s",slimy.text);}
 
-template <class T> void GridInlet::flow(int mode, long n, T *data) {TRACE;
+template <class T> void GridInlet::flow(long n, T *data) {TRACE;
 	CHECK_BUSY(inlet);
 	CHECK_TYPE(*data);
 	CHECK_ALIGN(data);
-	if (this->mode==0) {dex += n; return;} // ignore data
-	if (n==0) return; // no data
-	if (mode==0) return; // ignore data
+	if (!mode) {dex += n; return;} // ignore data
+	if (!n) return; // no data
 	long d = dex + bufi;
 	if (d+n > dim->prod()) {
 		post("grid input overflow: %d of %d from [%s] to [%s]", d+n, dim->prod(), ARGS(sender), 0);
@@ -268,7 +267,7 @@
 	CHECK_BUSY(outlet); CHECK_TYPE(*data); CHECK_ALIGN(data);
 	while (n>0) {
 		long pn = n;//min((long)n,MAX_PACKET_SIZE);
-		for (uint32 i=0; i<inlets.size(); i++) try {inlets[i]->flow(4,pn,data);} CATCH_IT;
+		for (uint32 i=0; i<inlets.size(); i++) try {inlets[i]->flow(pn,data);} CATCH_IT;
 		data+=pn, n-=pn;
 	}
 }

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Wed Jul 16 10:24:42 2008
@@ -730,7 +730,7 @@
 	void finish(); /* i thought this should be private but maybe it shouldn't. */
 
 	// n=-1 is begin, and n=-2 is finish.
-	template <class T> void flow(int mode, long n, T *data);
+	template <class T> void flow(long n, T *data);
 	void from_list(VA, NumberTypeE nt=int32_e) {Grid t(argc,argv,nt); from_grid(&t);}
 	void from_atom(VA) {Grid t(argv[0]); from_grid(&t);}
 	void from_grid(Grid *g);



More information about the Gridflow-cvs mailing list