mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare] Function constructor has additional length paramater
This commit is contained in:
committed by
Émilie Feral
parent
603e672cf3
commit
4b72e4cef2
@@ -46,9 +46,9 @@ private:
|
||||
|
||||
class Function : public SymbolAbstract {
|
||||
public:
|
||||
explicit Function(const char * name);
|
||||
Function(const char * name, size_t length);
|
||||
Function(const FunctionNode * n) : SymbolAbstract(n) {}
|
||||
explicit Function(const char * name, Expression child) : Function(name) {
|
||||
Function(const char * name, size_t length, Expression child) : Function(name, length) {
|
||||
replaceChildAtIndexInPlace(0, child);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,10 +87,10 @@ Evaluation<T> FunctionNode::templatedApproximate(Context& context, Preferences::
|
||||
return e.approximateToEvaluation<T>(newContext, angleUnit);
|
||||
}
|
||||
|
||||
Function::Function(const char * name) :
|
||||
Function(TreePool::sharedPool()->createTreeNode<FunctionNode>(SymbolAbstract::AlignedNodeSize(strlen(name), sizeof(FunctionNode))))
|
||||
Function::Function(const char * name, size_t length) :
|
||||
Function(TreePool::sharedPool()->createTreeNode<FunctionNode>(SymbolAbstract::AlignedNodeSize(length, sizeof(FunctionNode))))
|
||||
{
|
||||
static_cast<FunctionNode *>(Expression::node())->setName(name, strlen(name));
|
||||
static_cast<FunctionNode *>(Expression::node())->setName(name, length);
|
||||
}
|
||||
|
||||
Expression Function::replaceSymbolWithExpression(const SymbolAbstract & symbol, const Expression & expression) {
|
||||
|
||||
Reference in New Issue
Block a user