Replace variable with function call in assertions

Since the height variable is only used inside an NSAssert, and NSAsserts are disabled by default in Release builds, this change prevents four warnings (two standard, two static analysis) against a build.