[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:
Peter D. Barnes, Jr.
2016-09-03 18:13:21 -04:00
parent 4f05e5297b
commit 18e8001aaa
7 changed files with 17 additions and 11 deletions

View File

@@ -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.
*/

View File

@@ -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 */

View File

@@ -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.

View File

@@ -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

View File

@@ -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).

View File

@@ -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);

View File

@@ -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.