Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLM_FORCE_CTOR_INIT not working #812

Closed
subGlitch opened this issue Sep 5, 2018 · 1 comment
Closed

GLM_FORCE_CTOR_INIT not working #812

subGlitch opened this issue Sep 5, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@subGlitch
Copy link

subGlitch commented Sep 5, 2018

GLM_FORCE_CTOR_INIT worked in 0.9.9.0, but not in 0.9.9.1. Vectors are not zero-initialized by default.

Also, code in files detail/type_vec*.inl looks strange - no matter what value GLM_CONFIG_DEFAULTED_FUNCTIONS is - there will be either no Initializer List (with zeros), or no user-provided default Ctor at all. So, it looks like we can't have default zero-initialization in any case...

	// -- Implicit basic constructors --

#	if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_DISABLE
		template<typename T, qualifier Q>
		GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec()
#			if GLM_CONFIG_DEFAULTED_FUNCTIONS != GLM_DISABLE
				: x(0), y(0)
#			endif
		{}

		template<typename T, qualifier Q>
		GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, T, Q> const& v)
			: x(v.x), y(v.y)
		{}
#	endif
@Groovounet Groovounet added this to the GLM 0.9.9 milestone Sep 11, 2018
@Groovounet Groovounet self-assigned this Sep 11, 2018
@Groovounet Groovounet added the bug label Sep 11, 2018
@Groovounet
Copy link
Member

This issue is fixed in master branch for GLM 0.9.9.2 release.

Thanks for reporting!
Christophe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants