Compiler: Add #pragma deprecated.

This is based on SM, including patch to support macros/constants (https://hg.alliedmods.net/sourcemod-central/rev/ef8dd1cddc35).
Updated also some pawn includes to use this new pragma.
This commit is contained in:
Arkshine
2014-08-13 13:18:33 +02:00
parent 09303625fb
commit 520493fab1
11 changed files with 5685 additions and 5613 deletions

View File

@ -2535,6 +2535,7 @@ native plugin_flags(hdr=0, plid=-1);
*
* @noreturn
*/
#pragma deprecated Module dependency is now automatically handled by the compiler. This forward is no longer called.
forward plugin_modules();
/**
@ -2545,6 +2546,7 @@ forward plugin_modules();
*
* @noreturn
*/
#pragma deprecated Module dependency is now automatically handled by the compiler. This native has no effect.
native require_module(const module[]);
/**
@ -2556,6 +2558,7 @@ native require_module(const module[]);
*
* @return 1 if the server is 64 bit, 0 otherwise
*/
#pragma deprecated AMXX is not shipping 64bits builds anymore. This native is basically guaranteed to return 0.
native is_amd64_server();
/**

View File

@ -62,7 +62,7 @@ native bool:geoip_code3_ex(const ip[], result[4]);
*
* @return 1 on a successful lookup, 0 otherwise.
*/
//#pragma deprecated Use geoip_code2_ex() instead.
#pragma deprecated Use geoip_code2_ex() instead.
native geoip_code2(const ip[], ccode[3]);
/**
@ -76,7 +76,7 @@ native geoip_code2(const ip[], ccode[3]);
*
* @return 1 on a successful lookup, 0 otherwise.
*/
//#pragma deprecated Use geoip_code3() instead.
#pragma deprecated Use geoip_code3() instead.
native geoip_code3(const ip[], result[4]);
/**

View File

@ -543,6 +543,7 @@ forward client_spawn(id);
* @param Damage The amount of damage being done.
* @param DamageType The damage type being done (bitmask).
*/
#pragma deprecated It is suggested to use hamsandwich for this action instead.
native ns_takedamage(IDVictim, IDInflictor, IDAttacker, Float:Damage, DamageType);
/**

View File

@ -711,7 +711,7 @@ native strncmp(const string1[], const string2[], num, bool:ignorecase=false);
* Backwards compatibility stock - use argbreak or argparse.
* @deprecated this function does not work properly.
*/
//#pragma deprecated Use argbreak() instead
#pragma deprecated Use argbreak() instead
stock strbreak(const text[], Left[], leftLen, Right[], rightLen)
{
return argbreak(text, Left, leftLen, Right, rightLen);