File indexing completed on 2024-05-26 04:33:20

0001 /*
0002  * This file is part of Krita
0003  *
0004  * SPDX-FileCopyrightText: 2020 L. E. Segovia <amy@amyspark.me>
0005  *
0006  *  SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include "SeExprVariable.h"
0010 
0011 SeExprVariable::SeExprVariable()
0012     : KSeExpr::ExprVarRef(KSeExpr::ExprType().FP(1).Varying())
0013     , m_value(0)
0014 {
0015 }
0016 
0017 SeExprVariable::SeExprVariable(const double v)
0018     : KSeExpr::ExprVarRef(KSeExpr::ExprType().FP(1).Varying())
0019     , m_value(v)
0020 {
0021 }
0022 
0023 void SeExprVariable::eval(double *result)
0024 {
0025     result[0] = m_value;
0026 }
0027 
0028 void SeExprVariable::eval(const char **)
0029 {
0030     Q_ASSERT(!"Sanity check");
0031 }