Skip to content

Commit

Permalink
deal with real_sense's weak_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Ponza committed Apr 28, 2020
1 parent 45f3510 commit 5f85799
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions io/include/pcl/io/real_sense/real_sense_device_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@

#pragma once

#include <pcl/pcl_exports.h>

#include <pxcsession.h>
#include <pxccapture.h>
#include <pxccapturemanager.h>

#include <boost/utility.hpp>
#include <pcl/memory.h> // for pcl::shared_ptr, pcl::weak_ptr
#include <pcl/pcl_exports.h> // for PCL_EXPORTS

#include <boost/core/noncopyable.hpp> // for boost::noncopyable

#include <memory>
#include <cstddef> // for std::size_t
#include <mutex> // for std::lock_guard, std::mutex
#include <string> // for std::string
#include <vector> // for std::vector

namespace pcl
{
Expand Down Expand Up @@ -104,7 +108,7 @@ namespace pcl
pxcUID iuid;
pxcI32 didx;
std::string serial;
std::weak_ptr<RealSenseDevice> device_ptr;
weak_ptr<RealSenseDevice> device_ptr;
inline bool isCaptured () { return (!device_ptr.expired ()); }
};

Expand Down Expand Up @@ -132,8 +136,7 @@ namespace pcl
{

public:

using Ptr = std::shared_ptr<RealSenseDevice>;
using Ptr = pcl::shared_ptr<RealSenseDevice>;

inline const std::string&
getSerialNumber () { return (device_id_); }
Expand Down

0 comments on commit 5f85799

Please sign in to comment.