From dca8aa330b537bd9b8dd5688dd877da0e38e4255 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 2 May 2009 18:08:33 +0200 Subject: [PATCH] Reverted unnecessary changes. Compile still works without errors in this revision, confirmed 2009.05.02 18:00 +2. Initializing blank strings on function declaration had no effect. Also the parameter can be treated as optional when it's actually not. Reverted to avoid confusion. --- src/zr/config.inc | 8 ++++---- src/zr/playerclasses/attributes.inc | 8 ++++---- src/zr/playerclasses/playerclasses.inc | 2 +- src/zr/weapons/restrict.inc | 2 +- src/zr/weapons/weapons.inc | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/zr/config.inc b/src/zr/config.inc index e1cfb55..56d3638 100644 --- a/src/zr/config.inc +++ b/src/zr/config.inc @@ -93,7 +93,7 @@ ConfigLoad() * @param file The cvar define of the path to the file. * @return True if the file exists, false if not. */ -bool:ConfigGetFilePath(CvarsList:cvar, String:path[] = "") +bool:ConfigGetFilePath(CvarsList:cvar, String:path[]) { // Get cvar's path. decl String:filepath[PLATFORM_MAX_PATH]; @@ -313,10 +313,10 @@ bool:ConfigSettingToBool(const String:option[]) * Converts boolean value to "yes" or "no". * * @param bOption True/false value to be converted to "yes"/"no", respectively. - * @param option Variable to store "yes" or "no" in. - * @param maxlen Max length of return string, (can't be more than 4) + * @param option Destination string buffer to store "yes" or "no" in. + * @param maxlen Length of destination string buffer (can't be more than 4). */ -ConfigBoolToSetting(bool:bOption, String:option[] = "", maxlen) +ConfigBoolToSetting(bool:bOption, String:option[], maxlen) { // If option is true, then copy "yes" to return string. if (bOption) diff --git a/src/zr/playerclasses/attributes.inc b/src/zr/playerclasses/attributes.inc index c1b9c5a..f0d7fe4 100644 --- a/src/zr/playerclasses/attributes.inc +++ b/src/zr/playerclasses/attributes.inc @@ -130,7 +130,7 @@ bool:ClassGetTeamDefault(index, cachetype = ZR_CLASS_CACHE_MODIFIED) * is used, index will be used as a client index. * @return Number of cells written. -1 on error. */ -ClassGetName(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) +ClassGetName(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) { switch (cachetype) { @@ -165,7 +165,7 @@ ClassGetName(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLA * is used, index will be used as a client index. * @return Number of cells written. -1 on error. */ -ClassGetDescription(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) +ClassGetDescription(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) { switch (cachetype) { @@ -209,7 +209,7 @@ ClassGetDescription(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CA * is used, index will be used as a client index. * @return Number of cells written. -1 on error. */ -ClassGetModelPath(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) +ClassGetModelPath(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) { switch (cachetype) { @@ -351,7 +351,7 @@ ClassGetAlphaDamage(index, cachetype = ZR_CLASS_CACHE_PLAYER) * is used, index will be used as a client index. * @return Number of cells written. -1 on error. */ -ClassGetOverlayPath(index, String:buffer[] = "", maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) +ClassGetOverlayPath(index, String:buffer[], maxlen, cachetype = ZR_CLASS_CACHE_PLAYER) { switch (cachetype) { diff --git a/src/zr/playerclasses/playerclasses.inc b/src/zr/playerclasses/playerclasses.inc index 27effe6..bf8a0a6 100644 --- a/src/zr/playerclasses/playerclasses.inc +++ b/src/zr/playerclasses/playerclasses.inc @@ -688,7 +688,7 @@ ClassClientSetDefaultIndexes(client = -1) * index will be used as a client index. * @return Number of cells written. */ -ClassDumpData(index, cachetype, String:buffer[] = "", maxlen) +ClassDumpData(index, cachetype, String:buffer[], maxlen) { new cellcount; decl String:attribute[320]; diff --git a/src/zr/weapons/restrict.inc b/src/zr/weapons/restrict.inc index b620f38..3e7fed2 100644 --- a/src/zr/weapons/restrict.inc +++ b/src/zr/weapons/restrict.inc @@ -827,7 +827,7 @@ RestrictCreateGroupWeaponsArray(&Handle:arrayGroupWeapons, const String:weapongr * @param maxlen Maximum length of the weapon list, the rest is truncated. * @param separator Separator character between weapon names. */ -RestrictGetGroupWeapons(const String:groupname[], String:weaponlist[] = "", maxlen, const String:separator[]) +RestrictGetGroupWeapons(const String:groupname[], String:weaponlist[], maxlen, const String:separator[]) { KvRewind(kvWeaponGroups); KvJumpToKey(kvWeaponGroups, groupname); diff --git a/src/zr/weapons/weapons.inc b/src/zr/weapons/weapons.inc index 97b8aa6..4568e0a 100644 --- a/src/zr/weapons/weapons.inc +++ b/src/zr/weapons/weapons.inc @@ -218,7 +218,7 @@ bool:WeaponsIsValidWeapon(const String:weapon[]) * @param weapon The weapon name. * @param display Returns with the display name, is not changed if weapon is invalid. */ -WeaponGetDisplayName(const String:weapon[], String:display[] = "") +WeaponGetDisplayName(const String:weapon[], String:display[]) { // Reset keyvalue's traversal stack. KvRewind(kvWeapons);