Cleaned Code & Fixed Some Errors
This commit is contained in:
@@ -45,23 +45,6 @@
|
||||
return couldDefineVariable;
|
||||
}
|
||||
|
||||
- (BOOL)redefineVariable:(NSString *)variableName
|
||||
value:(NSDecimalNumber *)value
|
||||
error:(NSError *__autoreleasing *)error
|
||||
{
|
||||
BOOL couldDefineVariable = [[MPEvaluationContext sharedContext] redefineVariable:variableName
|
||||
value:value];
|
||||
if (!couldDefineVariable) {
|
||||
if (error) {
|
||||
NSString *localizedDescription = [NSString stringWithFormat:NSLocalizedString(@"Redifinition of variable \"%@\".", nil), variableName];
|
||||
*error = [NSError errorWithDomain:MPMathKitErrorDomain
|
||||
code:100
|
||||
userInfo:@{NSLocalizedDescriptionKey: localizedDescription}];
|
||||
}
|
||||
}
|
||||
return couldDefineVariable;
|
||||
}
|
||||
|
||||
- (NSDecimalNumber *)valueForVariable:(NSString *)variableName
|
||||
error:(NSError *__autoreleasing *)error
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user