From 868b9100bdefe4f38c7cfb744665357379febf50 Mon Sep 17 00:00:00 2001 From: Lingzhu Xiang Date: Tue, 1 Dec 2015 19:57:16 -0500 Subject: [PATCH] api: Revert workaround in cdd4f06 The workaround broke MSVC building. MSVC refuses to resolve the symbol because the return type is different, which was the point of the workaround. Alternative workarounds would make it more a mess. I have sent a patch to iai_kinect2 directly to use new API. --- .../internal/libfreenect2/depth_packet_processor.h | 3 +-- include/libfreenect2/libfreenect2.hpp | 13 ------------- include/libfreenect2/packet_pipeline.h | 5 ----- src/libfreenect2.cpp | 1 - src/packet_pipeline.cpp | 1 - 5 files changed, 1 insertion(+), 22 deletions(-) diff --git a/include/internal/libfreenect2/depth_packet_processor.h b/include/internal/libfreenect2/depth_packet_processor.h index 64bd0d5b9..6971d7b7b 100644 --- a/include/internal/libfreenect2/depth_packet_processor.h +++ b/include/internal/libfreenect2/depth_packet_processor.h @@ -33,7 +33,6 @@ #include #include -#define LIBFREENECT2_SETCONFIGURATION_COMPAT_INTERNAL #include #include #include @@ -53,7 +52,7 @@ struct DepthPacket /** Class for processing depth information. */ typedef PacketProcessor BaseDepthPacketProcessor; -class DepthPacketProcessor : public ConfigPacketProcessor, public BaseDepthPacketProcessor +class DepthPacketProcessor : public BaseDepthPacketProcessor { public: typedef Freenect2Device::Config Config; diff --git a/include/libfreenect2/libfreenect2.hpp b/include/libfreenect2/libfreenect2.hpp index b5f29c438..a4ba29996 100644 --- a/include/libfreenect2/libfreenect2.hpp +++ b/include/libfreenect2/libfreenect2.hpp @@ -365,19 +365,6 @@ class LIBFREENECT2_API Freenect2Device virtual void close() = 0; }; -/** Deprecated method to configure packet processors - * @deprecated Use Freenect2Device::setConfiguration() instead. - * - * Usage of `pipeline->getDepthPacketProcessor()->setConfiguration(config)` - * should be converted to `device->setConfiguration(config)` - */ -class ConfigPacketProcessor -{ -public: - typedef Freenect2Device::Config Config; - LIBFREENECT2_DEPRECATED virtual void setConfiguration(const Config &config) = 0; -}; - class Freenect2Impl; /** diff --git a/include/libfreenect2/packet_pipeline.h b/include/libfreenect2/packet_pipeline.h index b8ed0622b..8139fd92f 100644 --- a/include/libfreenect2/packet_pipeline.h +++ b/include/libfreenect2/packet_pipeline.h @@ -39,11 +39,6 @@ class RgbPacketProcessor; class DepthPacketProcessor; class PacketPipelineComponents; -class ConfigPacketProcessor; -#ifndef LIBFREENECT2_SETCONFIGURATION_COMPAT_INTERNAL -#define DepthPacketProcessor ConfigPacketProcessor -#endif - /** @defgroup pipeline Packet Pipelines * Implement various methods to decode color and depth images with different performance and platform support * diff --git a/src/libfreenect2.cpp b/src/libfreenect2.cpp index ae9991bdb..0d3b24c8d 100644 --- a/src/libfreenect2.cpp +++ b/src/libfreenect2.cpp @@ -34,7 +34,6 @@ #include #define WRITE_LIBUSB_ERROR(__RESULT) libusb_error_name(__RESULT) << " " << libusb_strerror((libusb_error)__RESULT) -#define LIBFREENECT2_SETCONFIGURATION_COMPAT_INTERNAL #include #include diff --git a/src/packet_pipeline.cpp b/src/packet_pipeline.cpp index 2da032c02..da14c0580 100644 --- a/src/packet_pipeline.cpp +++ b/src/packet_pipeline.cpp @@ -26,7 +26,6 @@ /** @file packet_pipeline.cpp Packet pipeline implementation. */ -#define LIBFREENECT2_SETCONFIGURATION_COMPAT_INTERNAL #include #include #include