Skip to content

Commit

Permalink
SonarCloud-inspired fixes
Browse files Browse the repository at this point in the history
- Added =delete copy constructors and assignment operators
- Added =default destructors
- check for &other==this in assignment operator

Signed-off-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
cary-ilm committed Nov 14, 2019
1 parent 1a8c617 commit f697f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PyIlmBase/PyImath/PyImathUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class PyAcquireLock
PYIMATH_EXPORT PyAcquireLock();
PYIMATH_EXPORT ~PyAcquireLock();
PYIMATH_EXPORT PyAcquireLock(const PyAcquireLock& other) = delete;
PYIMATH_EXPORT PyAcquireLock & operator = (PyAcquireLock& other) = delete;
PYIMATH_EXPORT const PyAcquireLock & operator = (PyAcquireLock& other) = delete;

private:
PyGILState_STATE _gstate;
Expand All @@ -88,7 +88,7 @@ class PyReleaseLock
PYIMATH_EXPORT PyReleaseLock();
PYIMATH_EXPORT ~PyReleaseLock();
PYIMATH_EXPORT PyReleaseLock(const PyReleaseLock& other) = delete;
PYIMATH_EXPORT PyReleaseLock & operator = (PyReleaseLock& other) = delete;
PYIMATH_EXPORT const PyReleaseLock & operator = (PyReleaseLock& other) = delete;

private:
PyThreadState *_save;
Expand Down

0 comments on commit f697f42

Please sign in to comment.