From d8c38815d6cec7b5189e8b1c6472c4897ead3a76 Mon Sep 17 00:00:00 2001 From: Hamed Date: Tue, 27 Jun 2017 19:13:33 -0700 Subject: [PATCH] Fixing inline functions --- src/AST/boolean.h | 2 +- src/AST/element.h | 4 ++-- src/Backend/satencoder.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AST/boolean.h b/src/AST/boolean.h index 297c383..a59aff1 100644 --- a/src/AST/boolean.h +++ b/src/AST/boolean.h @@ -51,7 +51,7 @@ Boolean * allocBooleanPredicate(Predicate * predicate, Element ** inputs, uint n Boolean * allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean ** array, uint asize); void deleteBoolean(Boolean * This); -inline FunctionEncoding* getPredicateFunctionEncoding(BooleanPredicate* func){ +static inline FunctionEncoding* getPredicateFunctionEncoding(BooleanPredicate* func){ return &func->encoding; } diff --git a/src/AST/element.h b/src/AST/element.h index 3f9693a..646276f 100644 --- a/src/AST/element.h +++ b/src/AST/element.h @@ -35,7 +35,7 @@ Element * allocElementSet(Set *s); Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus); void deleteElement(Element *This); -inline ElementEncoding* getElementEncoding(Element* This){ +static inline ElementEncoding* getElementEncoding(Element* This){ switch(GETELEMENTTYPE(This)){ case ELEMSET: return &((ElementSet*)This)->encoding; @@ -48,7 +48,7 @@ inline ElementEncoding* getElementEncoding(Element* This){ } -inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){ +static inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){ return &func->functionencoding; } diff --git a/src/Backend/satencoder.h b/src/Backend/satencoder.h index dcc6546..79e2c52 100644 --- a/src/Backend/satencoder.h +++ b/src/Backend/satencoder.h @@ -11,10 +11,10 @@ struct SATEncoder { VectorConstraint allConstraints; }; -inline VectorConstraint* getSATEncoderVars(SATEncoder* ne){ +static inline VectorConstraint* getSATEncoderVars(SATEncoder* ne){ return &ne->vars; } -inline VectorConstraint* getSATEncoderAllConstraints(SATEncoder* ne){ +static inline VectorConstraint* getSATEncoderAllConstraints(SATEncoder* ne){ return &ne->allConstraints; } SATEncoder * allocSATEncoder(); -- 2.34.1