daanmichiels / igl-hr

Hyperbolic space on the Oculus Rift
3 stars 0 forks source link

Variable names 'near' and 'far' are keywords #18

Closed daanmichiels closed 9 years ago

daanmichiels commented 9 years ago

In several places the variable names 'near' and 'far' are used (for the distances to the near and far plane). As it turns out, near and far are reserved keywords, at least to some compilers. I stumbled upon this issue when trying to find a 'syntax error' according to my compiler.

Solution: replace all variable names 'near' and 'far' by something else, for example 'near_plane' and 'far_plane'.

daanmichiels commented 9 years ago

This is not a priority.

daanmichiels commented 9 years ago

Also, it should be fixed in the master branch. That way it will be fixed automatically in all other branches as soon as they are merged (though it may be fixed in the other branches manually if necessary).

mcdaniel67 commented 9 years ago

Fixed on master. For those wanting to change their respective branches to reflect this change, look at lines 77-89 on rendermanager (calculate_projection function). The new names are near_fov and far_fov.