C++11: Fix some code
This commit is contained in:
parent
1199863e47
commit
1146bcad2c
|
@ -39,11 +39,11 @@ public:
|
||||||
: control_(0)
|
: control_(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
Entry(ke::Moveable<Entry> other)
|
Entry(Entry &&other)
|
||||||
{
|
{
|
||||||
control_ = other->control_;
|
control_ = other.control_;
|
||||||
data_ = other->data_;
|
data_ = other.data_;
|
||||||
other->control_ = 0;
|
other.control_ = 0;
|
||||||
}
|
}
|
||||||
~Entry()
|
~Entry()
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,12 +82,12 @@ static cell AMX_NATIVE_CALL register_touch(AMX *amx, cell *params)
|
||||||
Touch *p = new Touch;
|
Touch *p = new Touch;
|
||||||
|
|
||||||
if (!strlen(Toucher) || strcmp(Toucher, "*")==0) {
|
if (!strlen(Toucher) || strcmp(Toucher, "*")==0) {
|
||||||
p->Toucher.setVoid();
|
p->Toucher = "";
|
||||||
} else {
|
} else {
|
||||||
p->Toucher = Toucher;
|
p->Toucher = Toucher;
|
||||||
}
|
}
|
||||||
if (!strlen(Touched) || strcmp(Touched, "*")==0) {
|
if (!strlen(Touched) || strcmp(Touched, "*")==0) {
|
||||||
p->Touched.setVoid();
|
p->Touched = "";
|
||||||
} else {
|
} else {
|
||||||
p->Touched = Touched;
|
p->Touched = Touched;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,9 +253,9 @@ void pfnTouch(edict_t *pToucher, edict_t *pTouched)
|
||||||
META_RES res=MRES_IGNORED;
|
META_RES res=MRES_IGNORED;
|
||||||
for (i=0; i<Touches.length(); i++)
|
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);
|
retVal = MF_ExecuteForward(Touches[i]->Forward, (cell)ptrIndex, (cell)ptdIndex);
|
||||||
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)
|
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)
|
||||||
|
@ -270,7 +270,7 @@ void pfnTouch(edict_t *pToucher, edict_t *pTouched)
|
||||||
res=MRES_SUPERCEDE;
|
res=MRES_SUPERCEDE;
|
||||||
}
|
}
|
||||||
} else if (Touches[i]->Toucher.compare(ptrClass)==0) {
|
} 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);
|
retVal = MF_ExecuteForward(Touches[i]->Forward, (cell)ptrIndex, (cell)ptdIndex);
|
||||||
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)
|
if (retVal & 2/*PLUGIN_HANDLED_MAIN*/)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user