Preprocess out EDITOR-only vm_vec_ang_2_matrix
Remove vm_vec_ang_2_matrix from non-EDITOR builds so that sincos_2_matrix has only one caller, allowing compiler to implicitly inline it.
This commit is contained in:
parent
0f6a82963a
commit
a918692a23
|
@ -435,10 +435,10 @@ static inline vms_matrix vm_angles_2_matrix (const vms_angvec &a)
|
|||
return vm_angles_2_matrix(m, a), m;
|
||||
}
|
||||
|
||||
|
||||
#ifdef EDITOR
|
||||
//computes a matrix from a forward vector and an angle
|
||||
void vm_vec_ang_2_matrix (vms_matrix &m, const vms_vector &v, fixang a);
|
||||
|
||||
#endif
|
||||
|
||||
//computes a matrix from one or more vectors. The forward vector is required,
|
||||
//with the other two being optional. If both up & right vectors are passed,
|
||||
|
|
|
@ -428,6 +428,7 @@ void vm_angles_2_matrix(vms_matrix &m,const vms_angvec &a)
|
|||
sincos_2_matrix(m, al.b, fix_sincos(al.p), fix_sincos(al.h));
|
||||
}
|
||||
|
||||
#ifdef EDITOR
|
||||
//computes a matrix from a forward vector and an angle
|
||||
void vm_vec_ang_2_matrix(vms_matrix &m,const vms_vector &v,fixang a)
|
||||
{
|
||||
|
@ -439,6 +440,7 @@ void vm_vec_ang_2_matrix(vms_matrix &m,const vms_vector &v,fixang a)
|
|||
cosh = fixdiv(v.z,cosp);
|
||||
sincos_2_matrix(m, a, {sinp, cosp}, {sinh, cosh});
|
||||
}
|
||||
#endif
|
||||
|
||||
//computes a matrix from one or more vectors. The forward vector is required,
|
||||
//with the other two being optional. If both up & right vectors are passed,
|
||||
|
|
Loading…
Reference in a new issue