PVS: V794 The assignment operator should be protected from the case of 'this == ...'

This commit is contained in:
wmayer
2019-03-13 12:38:46 +01:00
parent 51811e4bf4
commit f611102db3
3 changed files with 11 additions and 0 deletions

View File

@@ -65,6 +65,9 @@ Toolpath::~Toolpath()
Toolpath &Toolpath::operator=(const Toolpath& otherPath)
{
if (this == &otherPath)
return *this;
clear();
vpcCommands.resize(otherPath.vpcCommands.size());
int i = 0;