Skip to content

Commit

Permalink
Disable default copy and assignment constructors
Browse files Browse the repository at this point in the history
To prevent locks from being copied.

Close #677.
  • Loading branch information
xlz committed Dec 5, 2016
1 parent a5959d4 commit d63b15f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/libfreenect2/frame_listener_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ class LIBFREENECT2_API SyncMultiFrameListener : public FrameListener
virtual bool onNewFrame(Frame::Type type, Frame *frame);
private:
SyncMultiFrameListenerImpl *impl_;

/* Disable copy and assignment constructors */
SyncMultiFrameListener(const SyncMultiFrameListener&);
SyncMultiFrameListener& operator=(const SyncMultiFrameListener&);
};

///@}
Expand Down
4 changes: 4 additions & 0 deletions include/libfreenect2/libfreenect2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ class LIBFREENECT2_API Freenect2
Freenect2Device *openDefaultDevice(const PacketPipeline *factory);
private:
Freenect2Impl *impl_;

/* Disable copy and assignment constructors */
Freenect2(const Freenect2&);
Freenect2& operator=(const Freenect2&);
};

///@}
Expand Down
4 changes: 4 additions & 0 deletions include/libfreenect2/registration.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ class LIBFREENECT2_API Registration

private:
RegistrationImpl *impl_;

/* Disable copy and assignment constructors */
Registration(const Registration&);
Registration& operator=(const Registration&);
};

} /* namespace libfreenect2 */
Expand Down

0 comments on commit d63b15f

Please sign in to comment.