Re-removed irrelevant warnings from vector/quaternion constructor special cases, and clarified comments. (See r2335, r2349)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2385 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
d7ed9045cf
commit
bd6755f77d
@ -308,8 +308,6 @@ static BOOL QuaternionFromArgumentListNoErrorInternal(JSContext *context, uintN
|
|||||||
*outQuaternion = make_quaternion(w, x, y, z);
|
*outQuaternion = make_quaternion(w, x, y, z);
|
||||||
if (outConsumed != NULL) *outConsumed = 4;
|
if (outConsumed != NULL) *outConsumed = 4;
|
||||||
|
|
||||||
OOReportJSWarning(context, @"The ability to pass four numbers instead of a quaternion is deprecated and will be removed in a future version of Oolite. Use an array literal instead (for instance, replace q.multiply(w, 1, 2, 3) with q.multiply([w, 1, 2, 3]).");
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ static BOOL VectorFromArgumentListNoErrorInternal(JSContext *context, uintN argc
|
|||||||
|
|
||||||
if (!permitNumberList) return NO;
|
if (!permitNumberList) return NO;
|
||||||
|
|
||||||
// Otherwise, look for three numbers.
|
// As a special case for VectorConstruct(), look for four numbers.
|
||||||
if (argc < 3) return NO;
|
if (argc < 3) return NO;
|
||||||
|
|
||||||
// Given a string, JS_ValueToNumber() returns YES but provides a NaN number.
|
// Given a string, JS_ValueToNumber() returns YES but provides a NaN number.
|
||||||
@ -323,8 +323,6 @@ static BOOL VectorFromArgumentListNoErrorInternal(JSContext *context, uintN argc
|
|||||||
*outVector = make_vector(x, y, z);
|
*outVector = make_vector(x, y, z);
|
||||||
if (outConsumed != NULL) *outConsumed = 3;
|
if (outConsumed != NULL) *outConsumed = 3;
|
||||||
|
|
||||||
OOReportJSWarning(context, @"The ability to pass three numbers instead of a vector is deprecated and will be removed in a future version of Oolite. Use an array literal instead (for instance, replace v.add(1, 2, z) with v.add([1, 2, z]).");
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
BOOL VectorFromArgumentListNoError(JSContext *context, uintN argc, jsval *argv, Vector *outVector, uintN *outConsumed)
|
BOOL VectorFromArgumentListNoError(JSContext *context, uintN argc, jsval *argv, Vector *outVector, uintN *outConsumed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user