Cleaned Code by Removing Location Tracking for Errors
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#import "MPPowerFunction.h"
|
||||
#import "MPExpression.h"
|
||||
|
||||
#import "MPExpressionTree.h"
|
||||
|
||||
@implementation MPPowerFunction
|
||||
|
||||
MPFunctionAccessorImplementation(ExponentExpression, _exponentExpression)
|
||||
@@ -18,13 +20,13 @@ MPFunctionAccessorImplementation(ExponentExpression, _exponentExpression)
|
||||
return @[@"exponentExpression"];
|
||||
}
|
||||
|
||||
- (BOOL)validate:(MPParseError *__autoreleasing *)error
|
||||
- (BOOL)validate:(NSError *__autoreleasing *)error
|
||||
{
|
||||
if (!self.baseValue) {
|
||||
if (error) {
|
||||
*error = MPParseError(NSMakeRange([self.parent convertIndex:[self.parent indexOfElement:self]
|
||||
fromReferenceFrame:MPElementReferenceFrame
|
||||
toReferenceFrame:MPSymbolReferenceFrame], 0), @"No Base for Power");
|
||||
*error = MPParseError(11,
|
||||
NSLocalizedString(@"No Base For Power.", @"Error message. This is displayed when a power does not have a base value."),
|
||||
nil);
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user