Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualJuliean

Posted 23 September 2013 - 01:49 PM

Hello,

 

I've just been back from my summer home to my studend accomodation. Now, when trying to compile my engine here after cloning it from GIT, I've encountered one specific error:

1>c:\acclimate engine\repo\acclimate\dx11\render\..\..\Render\StateGroup.h(54): error C2664: 'acl::dx11::BindRenderTargets::BindRenderTargets(const acl::dx11::BindRenderTargets &)' : cannot convert parameter 4 from 'int' to 'const acl::dx11::d3d::DepthBuffer *' (DX11\Render\Stage.cpp)
1>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast

in this line:

			const d3d::Texture* pTextures[] = {nullptr}; 
			m_stageStates.Add<BindRenderTargets>(pTextures, 1, nullptr);

Now, I'd probably searched some time, but I've noticed that the nullptr in this instance was painted violet instead of blue - so it was in the rest of the file, as well as the rest of the project! Now the issue appeared to me - nullptr was defined 0, which causes the template to deduce the wrong type for the last parameter (heh, thats why you should use them, I did it for convienince but seems to pay of).

 

Now, regardless of that the issue can "easily" be solved by adding an #undef nullptr to this file and all other files that possibly use it... how come this happening? At my laptop, I don't have that problem. I just compiled it not 1 hour ago, same commit. I'm using the same compiler, too - VS2012 with CTP - and I'm not using any external libaries other than the DirectX-sdk - 2010-version, on both PCs. I can hardly track where it comes from, too, since unless I undef, exluding specific files will take ages to make any difference for the markup. It also seem to affect almost the entire code, so I'm not sure.

 

Well, do you have any idea where this could come from?


#1Juliean

Posted 23 September 2013 - 01:21 PM

Hello,

 

I've just been back from my summer home to my studend accomodation. Now, when trying to compile my engine here after cloning it from GIT, I've encountered one specific error:

1>c:\acclimate engine\repo\acclimate\dx11\render\..\..\Render\StateGroup.h(54): error C2664: 'acl::dx11::BindRenderTargets::BindRenderTargets(const acl::dx11::BindRenderTargets &)' : cannot convert parameter 4 from 'int' to 'const acl::dx11::d3d::DepthBuffer *' (DX11\Render\Stage.cpp)
1>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast

in this line:

			const d3d::Texture* pTextures[] = {nullptr}; 
			m_stageStates.Add<BindRenderTargets>(pTextures, 1, nullptr);

Now, I'd probably searched some time, but I've noticed that the nullptr in this instance was painted violet instead of blue - so it was in the rest of the file, as well as the rest of the project! Now the issue appeared to me - nullptr was defined 0, which causes the template to deduce the wrong type for the last parameter (heh, thats why you should use them, I did it for convienince but seems to pay of).

 

Now, regardless of that the issue can "easily" be solved by adding an #undef nullptr to this file and all other files that possibly use it... how come this happening? At my laptop, I don't have that problem. I just compiled it not 1 hour ago, same commit. I'm using the same compiler, too - VS2012 with CTP - and I'm not using any external libaries other than the DirectX-sdk - 2010-version, on both PCs. I can hardly track where it comes from, too, since unless I undef, exluding specific files will take ages to make any difference for the markup. It also seem to affect almost the entire code, so I'm not sure.

 

Well, do you have any idea where this could come from?


PARTNERS