Skip to content

Commit cec93c7

Browse files
authored
Merge pull request OpenKinect#765 from xlz/disable-default-constructors
Disable default copy and assignment constructors
2 parents e67f80c + d63b15f commit cec93c7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

include/libfreenect2/frame_listener_impl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class LIBFREENECT2_API SyncMultiFrameListener : public FrameListener
7575
virtual bool onNewFrame(Frame::Type type, Frame *frame);
7676
private:
7777
SyncMultiFrameListenerImpl *impl_;
78+
79+
/* Disable copy and assignment constructors */
80+
SyncMultiFrameListener(const SyncMultiFrameListener&);
81+
SyncMultiFrameListener& operator=(const SyncMultiFrameListener&);
7882
};
7983

8084
///@}

include/libfreenect2/libfreenect2.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ class LIBFREENECT2_API Freenect2
268268
Freenect2Device *openDefaultDevice(const PacketPipeline *factory);
269269
private:
270270
Freenect2Impl *impl_;
271+
272+
/* Disable copy and assignment constructors */
273+
Freenect2(const Freenect2&);
274+
Freenect2& operator=(const Freenect2&);
271275
};
272276

273277
///@}

include/libfreenect2/registration.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ class LIBFREENECT2_API Registration
116116

117117
private:
118118
RegistrationImpl *impl_;
119+
120+
/* Disable copy and assignment constructors */
121+
Registration(const Registration&);
122+
Registration& operator=(const Registration&);
119123
};
120124

121125
} /* namespace libfreenect2 */

0 commit comments

Comments
 (0)