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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Thu Aug 12 22:51:16 EDT 2010


Author: matju
Date: Thu Aug 12 22:51:16 2010
New Revision: 6058

Log:
[gf/error]: use the same join() as [gf/sprintf] and [#sprintf]

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Thu Aug 12 22:51:16 2010
@@ -733,12 +733,7 @@
 
 \class GFError : FObject {
 	string format;
-	\constructor (...) {
-		std::ostringstream o;
-		char buf[MAXPDSTRING];
-		for (int i=0; i<argc; i++) {atom_string(&argv[i],buf,MAXPDSTRING); o << buf; if (i!=argc-1) o << ' ';}
-		format = o.str();
-	}
+	\constructor (...) {format = join(argc,argv);}
 	\decl 0 bang   ()          {_0_list(0,0);}
 	\decl 0 float  (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 symbol (t_atom2 a) {_0_list(1,&a);}
@@ -766,9 +761,7 @@
 	\decl 0 float  (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 symbol (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 list (...) {
-		std::ostringstream o;
-		pd_oprintf(o,format.data(),argc,argv);
-		string s = o.str();
+		std::ostringstream o; pd_oprintf(o,format.data(),argc,argv); string s = o.str();
 		outlet_symbol(outlets[0],gensym(s.data()));
 	}
 };
@@ -782,9 +775,7 @@
 	\decl 0 float  (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 symbol (t_atom2 a) {_0_list(1,&a);}
 	\decl 0 list (...) {
-		std::ostringstream o;
-		pd_oprintf(o,format.data(),argc,argv);
-		string s = o.str();
+		std::ostringstream o; pd_oprintf(o,format.data(),argc,argv); string s = o.str();
 		GridOutlet out(this,0,Dim(s.size()),cast); out.send(s.size(),(uint8 *)s.data());
 	}
 };



More information about the Gridflow-cvs mailing list