[core] Fix compilation errors from new NS_DEPRECATED function macro in r 12293 [57597d3fb31e]
Remove function macro and return to simple tag. GCC can have the attribute in front of the function declaration, matching Windows.
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
* \deprecated This method will go away in future versions of ns-3.
|
||||
* See instead TheNewWay()
|
||||
*/
|
||||
NS_DEPRECATED(void SomethingUseful (void) );
|
||||
NS_DEPRECATED
|
||||
void SomethingUseful (void);
|
||||
/*
|
||||
* Do something more useful.
|
||||
*/
|
||||
|
||||
@@ -45,17 +45,19 @@
|
||||
/* Test for GCC >= 4.1 */
|
||||
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
|
||||
#if (GCC_VERSION >= 40100)
|
||||
#define NS_DEPRECATED(x) x __attribute__ ((deprecated))
|
||||
#define NS_DEPRECATED __attribute__ ((deprecated))
|
||||
#endif
|
||||
#undef GCC_VERSION
|
||||
|
||||
|
||||
#elif defined(__clang__) || defined(__llvm__)
|
||||
#define NS_DEPRECATED(x) x __attribute__ ((deprecated))
|
||||
#define NS_DEPRECATED __attribute__ ((deprecated))
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#define NS_DEPRECATED __declspec(deprecated) x
|
||||
#define NS_DEPRECATED __declspec(deprecated)
|
||||
|
||||
#else
|
||||
#define NS_DEPRECATED(x) x
|
||||
#define NS_DEPRECATED
|
||||
#endif
|
||||
|
||||
#endif /* NS3_DEPRECATED_H */
|
||||
|
||||
@@ -399,10 +399,10 @@ public:
|
||||
* \returns this TypeId instance.
|
||||
* \deprecated
|
||||
*/
|
||||
NS_DEPRECATED (
|
||||
NS_DEPRECATED
|
||||
TypeId AddTraceSource (std::string name,
|
||||
std::string help,
|
||||
Ptr<const TraceSourceAccessor> accessor) );
|
||||
Ptr<const TraceSourceAccessor> accessor);
|
||||
|
||||
/**
|
||||
* Record a new TraceSource.
|
||||
|
||||
@@ -188,7 +188,8 @@ public:
|
||||
* \deprecated This method will go away in future versions of ns-3.
|
||||
* See instead CalculateBytesTxTime()
|
||||
*/
|
||||
NS_DEPRECATED (double CalculateTxTime (uint32_t bytes) const );
|
||||
NS_DEPRECATED
|
||||
double CalculateTxTime (uint32_t bytes) const;
|
||||
|
||||
/**
|
||||
* Get the underlying bitrate
|
||||
|
||||
@@ -229,7 +229,8 @@ public:
|
||||
*
|
||||
* \return true if "all hosts multicast", false otherwise
|
||||
*/
|
||||
NS_DEPRECATED (bool IsAllHostsMulticast () const );
|
||||
NS_DEPRECATED
|
||||
bool IsAllHostsMulticast () const;
|
||||
|
||||
/**
|
||||
* \brief If the IPv6 address is a link-local address (fe80::/64).
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
virtual void SetReceiveErrorCallback (RxErrCallback cb);
|
||||
virtual void SetRxGainDb (double gain);
|
||||
virtual void SetTxPowerDb (double txpwr);
|
||||
NS_DEPRECATED (virtual void SetRxThresholdDb (double thresh) );
|
||||
NS_DEPRECATED virtual void SetRxThresholdDb (double thresh);
|
||||
virtual void SetCcaThresholdDb (double thresh);
|
||||
virtual double GetRxGainDb (void);
|
||||
virtual double GetTxPowerDb (void);
|
||||
|
||||
@@ -253,7 +253,8 @@ public:
|
||||
* \deprecated This method will go away in future versions of ns-3.
|
||||
* The constructor of the class is now performing the same job, which makes this function useless.
|
||||
*/
|
||||
NS_DEPRECATED (static WifiHelper Default (void) );
|
||||
NS_DEPRECATED
|
||||
static WifiHelper Default (void);
|
||||
|
||||
/**
|
||||
* \param type the type of ns3::WifiRemoteStationManager to create.
|
||||
|
||||
Reference in New Issue
Block a user