Fix warnings, merge, and check my code in
[satune.git] / src / AST / function.c
index c9d0717..c816363 100644 (file)
@@ -4,30 +4,31 @@
 
 
 Function* allocFunctionOperator( ArithOp op, Set ** domain, uint numDomain, Set * range,OverFlowBehavior overflowbehavior){
-    FunctionOperator* This = (FunctionOperator*) ourmalloc(sizeof(FunctionOperator));
-    GETFUNCTIONTYPE(This)=OPERATORFUNC;
-    This->domains = allocVectorArraySet(numDomain, domain);
-    This->op=op;
-    This->overflowbehavior = overflowbehavior;
-    This->range=range;
-    return  &This->base;
+       FunctionOperator* This = (FunctionOperator*) ourmalloc(sizeof(FunctionOperator));
+       GETFUNCTIONTYPE(This)=OPERATORFUNC;
+       This->domains = allocVectorArraySet(numDomain, domain);
+       This->op=op;
+       This->overflowbehavior = overflowbehavior;
+       This->range=range;
+       return &This->base;
 }
 
 Function* allocFunctionTable (Table* table){
-    FunctionTable* This = (FunctionTable*) ourmalloc(sizeof(FunctionTable));
-    GETFUNCTIONTYPE(This)=TABLEFUNC;
-    This->table = table;
+       FunctionTable* This = (FunctionTable*) ourmalloc(sizeof(FunctionTable));
+       GETFUNCTIONTYPE(This)=TABLEFUNC;
+       This->table = table;
+       return &This->base;
 }
 
 void deleteFunction(Function* This){
-    switch( GETFUNCTIONTYPE(This)){
+       switch(GETFUNCTIONTYPE(This)){
        case TABLEFUNC:
-           ourfree((FunctionTable*)This);
-           break;
+               ourfree((FunctionTable*)This);
+               break;
        case OPERATORFUNC:
-           ourfree((FunctionOperator*) This);
-           break;
+               ourfree((FunctionOperator*) This);
+               break;
        default:
-           ASSERT(0);
-    }
+               ASSERT(0);
+       }
 }