Examples of errors detected by the V546 diagnostic

V546. Member of a class is initialized by itself: 'Foo(Foo)'.


Boost (C++ libraries)

V546 Member of a class is initialized by itself: 'size1_(size1_)'. sparse_view.hpp 193


BOOST_UBLAS_INLINE
compressed_matrix_view(const compressed_matrix_view& o) :
  size1_(size1_), size2_(size2_),
  nnz_(nnz_),
  index1_data_(index1_data_),
  index2_data_(index2_data_),
  value_data_(value_data_)
{}

Also: size2_, nnz_, index1_data_, index2_data_, value_data_.


OpenToonz

V546 Member of a class is initialized by itself: 'm_subId(m_subId)'. tfarmcontroller.cpp 572


class TaskId
{
  int m_id;
  int m_subId;

public:
  TaskId(int id, int subId = -1) : m_id(id), m_subId(m_subId){};

CryEngine V

V546 Member of a class is initialized by itself: 'eConfigMax(eConfigMax)'. particleparams.h 1013


ParticleParams() :
  ....
  fSphericalApproximation(1.f),
  fVolumeThickness(1.0f),
  fSoundFXParam(1.f),
  eConfigMax(eConfigMax.VeryHigh), // <=
  fFadeAtViewCosAngle(0.f)
{}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++ and C#

goto PVS-Studio;