[Gridflow-cvs] [svn] commit: r5919 - /trunk/src/classes2.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Tue Aug 3 17:32:29 EDT 2010


Author: matju
Date: Tue Aug  3 17:32:27 2010
New Revision: 5919

Log:
avoid typeof() on non-static member from static member because gcc only does it with version >= 4.4

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Tue Aug  3 17:32:27 2010
@@ -214,9 +214,11 @@
 \end class {install("setargs",1,1);}
 
 \class GFAttr : FObject {
-	std::map<t_symbol *,std::vector<t_atom2> > table;
+	typedef std::map<t_symbol *,std::vector<t_atom2> > table_t;
+	table_t table;
 	\constructor () {}
-	void outlet_entry(const typeof(table.begin()) &f) {
+	//void outlet_entry(const typeof(table.begin()) &f) // can't use this in gcc<4.4
+	void outlet_entry(const table_t::iterator &f) {
 		outlet_anything(outlets[0],f->first,f->second.size(),f->second.data());
 	}
 	\decl 0 get (t_symbol *s=0) {
@@ -800,6 +802,7 @@
 GRID_INLET(0) {
 	if (in.dim.n != 3) RAISE("expecting 3 dimensions: rows,columns,channels");
 	if (in.dim[2]<1 || in.dim[2]>4) RAISE("expecting 1 to 4 channels: y, ya, rgb, rgba (got %d)",in.dim[2]);
+	if (!in.dim.prod()) RAISE("zero-sized image not supported");
 	in.set_chunk(0);
 	buf=new Grid(in.dim,NumberTypeE_type_of(data));
 } GRID_FLOW {



More information about the Gridflow-cvs mailing list