C++11: Fix some code
This commit is contained in:
parent
1199863e47
commit
1146bcad2c
|
@ -39,11 +39,11 @@ public:
|
|||
: control_(0)
|
||||
{
|
||||
}
|
||||
Entry(ke::Moveable<Entry> other)
|
||||
Entry(Entry &&other)
|
||||
{
|
||||
control_ = other->control_;
|
||||
data_ = other->data_;
|
||||
other->control_ = 0;
|
||||
control_ = other.control_;
|
||||
data_ = other.data_;
|
||||
other.control_ = 0;
|
||||
}
|
||||
~Entry()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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*/)
|
||||
|
|
Loading…
Reference in New Issue
Block a user