Ver código fonte

scene: fix multiple crashes in release mode and a few warnings.

In release mode our asserts are ignored for performance reasons and all
the code they may be executing is disabled, so no side effects will happen.
We can’t put programming logic in asserts.
undefined
Sam Hocevar 9 anos atrás
pai
commit
d9f2b07822
2 arquivos alterados com 3 adições e 1 exclusões
  1. +1
    -0
      src/input/controller.h
  2. +2
    -1
      src/sys/threadbase.h

+ 1
- 0
src/input/controller.h Ver arquivo

@@ -343,6 +343,7 @@ public:
case InputType::JoystickKey:/***/*this << InputProfile::JoystickKey/***/(joy, (int)i, T((int)i).ToString()); break;
case InputType::MouseAxis:/*****/*this << InputProfile::MouseAxis/*****/(/***/(int)i, T((int)i).ToString()); break;
case InputType::JoystickAxis:/**/*this << InputProfile::JoystickAxis/**/(joy, (int)i, T((int)i).ToString()); break;
default: break;
}
}
}


+ 2
- 1
src/sys/threadbase.h Ver arquivo

@@ -81,11 +81,12 @@ public:
#endif
}

//Will not block if another thread has already locked ---------------------
// Will not block if another thread has already locked ---------------------
bool try_lock()
{
#if !defined(LOL_FEATURE_THREADS) || !LOL_FEATURE_THREADS
/* Nothing */
return false;
#elif LOL_FEATURE_CXX11_THREADS
return m_mutex.try_lock();
#elif defined HAVE_PTHREAD_H


Carregando…
Cancelar
Salvar