That’s safe, although I agree with Quincey that you should use ‘const’.
However, this seems like overkill. Why not just declare a static const float
array inside your source file and use that?
I forgot to mention another useful C array trick. If you have a fixed-size
array and want to treat it as pass-by-value, i.e. copying it when passing as a
parameter or returning it, just wrap it in a struct. I use this idiom pretty
often, for example:
typedef struct {
uint8_t bytes[20];
} SHA1Digest;
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com
This email sent to [email protected]