aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src/desire.c
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-06-03 20:05:09 +0000
committerN.N. <matju@users.sourceforge.net>2009-06-03 20:05:09 +0000
commitb0275aa9b3a9f085425a47a93c1f7c59a1d835f6 (patch)
treedb3b5560f6a4346bf1413ccab66d4aad73accd93 /desiredata/src/desire.c
parent12f31332d54505a28bd49086ce260f4d3e06fa2c (diff)
using namespace desire;
svn path=/trunk/; revision=11660
Diffstat (limited to 'desiredata/src/desire.c')
-rw-r--r--desiredata/src/desire.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/desiredata/src/desire.c b/desiredata/src/desire.c
index 4149eb69..dfad2e1e 100644
--- a/desiredata/src/desire.c
+++ b/desiredata/src/desire.c
@@ -10,8 +10,8 @@
*/
#define PD_PLUSPLUS_FACE
-#include "m_pd.h"
#include "desire.h"
+using namespace desire;
#include <ctype.h>
#include <math.h>
#include <stdarg.h>
@@ -1335,14 +1335,11 @@ t_array *garray_getarray(t_garray *x) {
t_scalar *sc = x->scalar;
t_template *t = template_findbyname(sc->t);
TEMPLATE_CHECK(sc->t,0)
- if (!template_find_field(t, gensym("z"), &zonset, &ztype, &zarraytype)) {
+ if (!template_find_field(t,gensym("z"),&zonset,&ztype,&zarraytype)) {
error("template %s has no 'z' field", sc->t->name);
return 0;
}
- if (ztype != DT_ARRAY) {
- error("template %s, 'z' field is not an array", sc->t->name);
- return 0;
- }
+ if (ztype != DT_ARRAY) {error("template %s, 'z' field is not an array", sc->t->name); return 0;}
return sc->v[zonset].w_array;
}
@@ -1352,8 +1349,7 @@ static t_array *garray_getarray_floatonly(t_garray *x, int *yonsetp, int *elemsi
int yonset, type;
t_symbol *arraytype;
t_template *t = template_findbyname(a->tsym);
- if (!template_find_field(t,&s_y,&yonset,&type,&arraytype) || type != DT_FLOAT)
- return 0;
+ if (!template_find_field(t,&s_y,&yonset,&type,&arraytype) || type != DT_FLOAT) return 0;
*yonsetp = yonset;
*elemsizep = a->elemsize;
return a;
@@ -1366,7 +1362,6 @@ int garray_getname(t_garray *x, t_symbol **namep) {
return x->hidename;
}
-
/* if there is one garray in a graph, reset the graph's coordinates to fit a new size and style for the garray */
static void garray_fittograph(t_garray *x, int n, int style) {
t_array *array = garray_getarray(x);