summaryrefslogtreecommitdiff
path: root/src/common/HPMi.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-11 02:16:59 +0200
committerHaru <haru@dotalux.com>2015-08-15 00:51:45 +0200
commit5efc9f173f6905da39f3037c278e0e880e82ca35 (patch)
tree817b3d13d20a3fe99fe4d7465b22148b9ad66dd3 /src/common/HPMi.h
parent7c52605cabb4f5447055344733d69555c1948956 (diff)
downloadhercules-5efc9f173f6905da39f3037c278e0e880e82ca35.tar.gz
hercules-5efc9f173f6905da39f3037c278e0e880e82ca35.tar.bz2
hercules-5efc9f173f6905da39f3037c278e0e880e82ca35.tar.xz
hercules-5efc9f173f6905da39f3037c278e0e880e82ca35.zip
Removed some unnecessary shared symbols, already present in interfaces
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPMi.h')
-rw-r--r--src/common/HPMi.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 5f677cce3..6f97659f9 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -139,33 +139,37 @@ enum HPluginConfType {
#define getFromBGDATA(ptr,index) (HPMi->getFromHPData(HPDT_BGDATA,HPMi->pid,(ptr),(index)))
#define removeFromBGDATA(ptr,index) (HPMi->removeFromHPData(HPDT_BGDATA,HPMi->pid,(ptr),(index)))
-/* HPMi->addCommand */
-#define addAtcommand(cname,funcname) \
- if ( HPMi->addCommand != NULL ) { \
+/// HPMi->addCommand
+#define addAtcommand(cname,funcname) do { \
+ if (HPMi->addCommand != NULL) { \
HPMi->addCommand(cname,atcommand_ ## funcname); \
} else { \
ShowWarning("HPM (%s):addAtcommand(\"%s\",%s) failed, addCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
- }
-/* HPMi->addScript */
-#define addScriptCommand(cname,scinfo,funcname) \
- if ( HPMi->addScript != NULL ) { \
+ } \
+} while(0)
+/// HPMi->addScript
+#define addScriptCommand(cname,scinfo,funcname) do { \
+ if (HPMi->addScript != NULL) { \
HPMi->addScript(cname,scinfo,buildin_ ## funcname, false); \
} else { \
ShowWarning("HPM (%s):addScriptCommand(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\
- }
-#define addScriptCommandDeprecated(cname,scinfo,funcname) \
- if ( HPMi->addScript != NULL ) { \
+ } \
+} while(0)
+#define addScriptCommandDeprecated(cname,scinfo,funcname) do { \
+ if (HPMi->addScript != NULL) { \
HPMi->addScript(cname,scinfo,buildin_ ## funcname, true); \
} else { \
ShowWarning("HPM (%s):addScriptCommandDeprecated(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\
- }
-/* HPMi->addCPCommand */
-#define addCPCommand(cname,funcname) \
- if ( HPMi->addCPCommand != NULL ) { \
+ } \
+} while(0)
+/// HPMi->addCPCommand
+#define addCPCommand(cname,funcname) do { \
+ if (HPMi->addCPCommand != NULL) { \
HPMi->addCPCommand(cname,console_parse_ ## funcname); \
} else { \
ShowWarning("HPM (%s):addCPCommand(\"%s\",%s) failed, addCPCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
- }
+ } \
+} while(0)
/* HPMi->addPacket */
#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
/* HPMi->addBattleConf */