Remove NS_DEPRECATED_3_37 methods
This commit is contained in:
@@ -102,11 +102,4 @@
|
||||
*/
|
||||
#define NS_DEPRECATED_3_38(msg) NS_DEPRECATED(msg)
|
||||
|
||||
/**
|
||||
* \ingroup core
|
||||
* \def NS_DEPRECATED_3_37
|
||||
* Tag for things deprecated in version ns-3.37.
|
||||
*/
|
||||
#define NS_DEPRECATED_3_37(msg) NS_DEPRECATED(msg)
|
||||
|
||||
#endif /* NS3_DEPRECATED_H */
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define PTR_H
|
||||
|
||||
#include "assert.h"
|
||||
#include "deprecated.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
@@ -80,23 +79,6 @@ class Ptr
|
||||
/** The pointer. */
|
||||
T* m_ptr;
|
||||
|
||||
/**
|
||||
* Helper to test for null pointer.
|
||||
*
|
||||
* \note This has been deprecated; \see operator bool() instead.
|
||||
*
|
||||
* This supports the "safe-bool" idiom, see `operator Tester * ()`
|
||||
*/
|
||||
// Don't deprecate the class because the warning fires
|
||||
// every time ptr.h is merely included, masking the real uses of Tester
|
||||
// Leave the macro here so we can find this later to actually remove it.
|
||||
class /* NS_DEPRECATED_3_37 ("see operator bool") */ Tester
|
||||
{
|
||||
public:
|
||||
// Delete operator delete to avoid misuse
|
||||
void operator delete(void*) = delete;
|
||||
};
|
||||
|
||||
/** Interoperate with const instances. */
|
||||
friend class Ptr<const T>;
|
||||
|
||||
@@ -197,23 +179,6 @@ class Ptr
|
||||
*/
|
||||
T& operator*();
|
||||
|
||||
/**
|
||||
* Test for non-NULL Ptr.
|
||||
*
|
||||
* \note This has been deprecated; \see operator bool() instead.
|
||||
*
|
||||
* This enables simple pointer checks like
|
||||
* \code
|
||||
* Ptr<...> p = ...;
|
||||
* if (p) ...
|
||||
* \endcode
|
||||
* This also disables deleting a Ptr
|
||||
*
|
||||
* This supports the "safe-bool" idiom; see [More C++ Idioms/Safe
|
||||
* bool](https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Safe_bool)
|
||||
*/
|
||||
NS_DEPRECATED_3_37("see operator bool")
|
||||
operator Tester*() const;
|
||||
/**
|
||||
* Test for non-NULL pointer.
|
||||
*
|
||||
@@ -773,17 +738,6 @@ Ptr<T>::operator*()
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Ptr<T>::operator Tester*() const // NS_DEPRECATED_3_37
|
||||
{
|
||||
if (m_ptr == nullptr)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
static Tester test;
|
||||
return &test;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Ptr<T>::operator bool() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user