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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Jul 14 14:22:55 EDT 2008


Author: matju
Date: Mon Jul 14 14:22:55 2008
New Revision: 4023

Log:
move oprintf,voprintf to header as static inline

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

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Mon Jul 14 14:22:55 2008
@@ -40,19 +40,6 @@
 /* both oprintf are copied from desiredata */
 
 //using namespace std; // can't
-
-static void voprintf(std::ostream &buf, const char *s, va_list args) {
-    char *b;
-    vasprintf(&b,s,args);
-    buf << b;
-    free(b);
-}
-static void oprintf(std::ostream &buf, const char *s, ...) {
-    va_list args;
-    va_start(args,s);
-    voprintf(buf,s,args);
-    va_end(args);
-}
 
 /* ---------------------------------------------------------------- */
 

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Mon Jul 14 14:22:55 2008
@@ -922,4 +922,17 @@
 
 extern FClass ciFObject, ciFormat;
 
+static inline void voprintf(std::ostream &buf, const char *s, va_list args) {
+    char *b;
+    vasprintf(&b,s,args);
+    buf << b;
+    free(b);
+}
+static inline void oprintf(std::ostream &buf, const char *s, ...) {
+    va_list args;
+    va_start(args,s);
+    voprintf(buf,s,args);
+    va_end(args);
+}
+
 #endif // __GF_GRID_H



More information about the Gridflow-cvs mailing list