Bläddra i källkod

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 år sedan
förälder
incheckning
d9f2b07822
2 ändrade filer med 3 tillägg och 1 borttagningar
  1. +1
    -0
      src/input/controller.h
  2. +2
    -1
      src/sys/threadbase.h

+ 1
- 0
src/input/controller.h Visa fil

@@ -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 Visa fil

@@ -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


Laddar…
Avbryt
Spara