mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Destructor fixes
This commit is contained in:
parent
707c3e3ed1
commit
dfc69b4b5f
@ -24,6 +24,8 @@ protected:
|
||||
: next_(NULL)
|
||||
{ }
|
||||
|
||||
~LinkedListNode() { }
|
||||
|
||||
public:
|
||||
T* getNextListNode() const { return next_; }
|
||||
|
||||
|
||||
@ -151,6 +151,9 @@ private:
|
||||
}
|
||||
template <typename> void initialize(...) { }
|
||||
|
||||
protected:
|
||||
~ArrayImpl() { }
|
||||
|
||||
public:
|
||||
typedef typename StorageType<T>::Type ValueType;
|
||||
typedef typename Base::SizeType SizeType;
|
||||
|
||||
@ -20,13 +20,16 @@ class DurationBase
|
||||
{
|
||||
int64_t usec_;
|
||||
|
||||
public:
|
||||
protected:
|
||||
~DurationBase() { }
|
||||
|
||||
DurationBase()
|
||||
: usec_(0)
|
||||
{
|
||||
StaticAssert<(sizeof(D) == 8)>::check();
|
||||
}
|
||||
|
||||
public:
|
||||
static D getInfinite() { return fromUSec(std::numeric_limits<int64_t>::max()); }
|
||||
|
||||
static D fromUSec(int64_t us)
|
||||
@ -93,7 +96,9 @@ class TimeBase
|
||||
{
|
||||
uint64_t usec_;
|
||||
|
||||
public:
|
||||
protected:
|
||||
~TimeBase() { }
|
||||
|
||||
TimeBase()
|
||||
: usec_(0)
|
||||
{
|
||||
@ -101,6 +106,7 @@ public:
|
||||
StaticAssert<(sizeof(D) == 8)>::check();
|
||||
}
|
||||
|
||||
public:
|
||||
static T getMax() { return fromUSec(std::numeric_limits<uint64_t>::max()); }
|
||||
|
||||
static T fromUSec(uint64_t us)
|
||||
@ -256,7 +262,7 @@ std::string TimeBase<T, D>::toString() const
|
||||
|
||||
template <typename Stream, typename D>
|
||||
UAVCAN_EXPORT
|
||||
Stream& operator<<(Stream& s, DurationBase<D> d)
|
||||
Stream& operator<<(Stream& s, const DurationBase<D>& d)
|
||||
{
|
||||
char buf[DurationBase<D>::StringBufSize];
|
||||
d.toString(buf);
|
||||
@ -266,7 +272,7 @@ Stream& operator<<(Stream& s, DurationBase<D> d)
|
||||
|
||||
template <typename Stream, typename T, typename D>
|
||||
UAVCAN_EXPORT
|
||||
Stream& operator<<(Stream& s, TimeBase<T, D> t)
|
||||
Stream& operator<<(Stream& s, const TimeBase<T, D>& t)
|
||||
{
|
||||
char buf[TimeBase<T, D>::StringBufSize];
|
||||
t.toString(buf);
|
||||
|
||||
@ -36,6 +36,7 @@ class UAVCAN_EXPORT Noncopyable
|
||||
Noncopyable& operator=(const Noncopyable&);
|
||||
protected:
|
||||
Noncopyable() { }
|
||||
~Noncopyable() { }
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user