Merge pull request #162 from Arkshine/feature/update-amtl-c++11

Add C++11 support
This commit is contained in:
Vincent Herbet
2015-01-06 22:38:19 +01:00
31 changed files with 1492 additions and 383 deletions

View File

@ -82,12 +82,12 @@ static cell AMX_NATIVE_CALL register_touch(AMX *amx, cell *params)
Touch *p = new Touch;
if (!strlen(Toucher) || strcmp(Toucher, "*")==0) {
p->Toucher.setVoid();
p->Toucher = "";
} else {
p->Toucher = Toucher;
}
if (!strlen(Touched) || strcmp(Touched, "*")==0) {
p->Touched.setVoid();
p->Touched = "";
} else {
p->Touched = Touched;
}

View File

@ -253,9 +253,9 @@ void pfnTouch(edict_t *pToucher, edict_t *pTouched)
META_RES res=MRES_IGNORED;
for (i=0; i<Touches.length(); i++)
{
if (Touches[i]->Toucher.isVoid())
if (Touches[i]->Toucher.length() == 0)
{
if (Touches[i]->Touched.isVoid())
if (Touches[i]->Touched.length() == 0)
{
retVal = MF_ExecuteForward(Touches[i]->Forward, (cell)ptrIndex, (cell)ptdIndex);
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)
@ -270,7 +270,7 @@ void pfnTouch(edict_t *pToucher, edict_t *pTouched)
res=MRES_SUPERCEDE;
}
} else if (Touches[i]->Toucher.compare(ptrClass)==0) {
if (Touches[i]->Touched.isVoid())
if (Touches[i]->Touched.length() == 0)
{
retVal = MF_ExecuteForward(Touches[i]->Forward, (cell)ptrIndex, (cell)ptdIndex);
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)

View File

@ -13,10 +13,10 @@ if AMXX.mysql_path:
binary.compiler.defines += [
'SM_DEFAULT_THREADER',
'HAVE_STDINT_H',
'stricmp=strcasecmp',
]
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
binary.compiler.defines += ['stricmp=strcasecmp']
binary.compiler.linkflags += [
os.path.join(AMXX.mysql_path, 'lib', 'libmysqlclient_r.a'),
'-lz',

View File

@ -9,11 +9,11 @@ binary.compiler.cxxincludes += [
]
binary.compiler.defines += [
'SM_DEFAULT_THREADER',
'stricmp=strcasecmp',
'HAVE_STDINT_H',
]
if builder.target_platform == 'linux':
binary.compiler.defines += ['stricmp=strcasecmp']
binary.compiler.postlink += ['-lpthread']
binary.sources += [