Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename IBaseInterface>
- struct TVariable : public IBaseInterface
- {
- virtual BOOL IsValid() { .... }
- ....
- };
- struct SMember :
- public TVariable<TMember<ID3DX11EffectVariable> >
- {
- };
- CEffectVectorOwner<SMember> m_pMemberInterfaces;
- HRESULT CEffect::CopyMemberInterfaces( CEffect* pEffectSource )
- {
- ....
- ZeroMemory( &m_pMemberInterfaces[i],
- sizeof(SMember) * ( Members - i ) );
- ....
- }
- This suspicious code was found in SlimDX project by PVS-Studio static code analyzer.
- Warning message is:
- V598 The 'memset' function is used to nullify the fields of 'SMember' class. Virtual method table will be damaged by this. effectnonruntime.cpp 1739
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment