Browse Source

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 years ago
parent
commit
d9f2b07822
2 changed files with 3 additions and 1 deletions
  1. +1
    -0
      src/input/controller.h
  2. +2
    -1
      src/sys/threadbase.h

+ 1
- 0
src/input/controller.h View File

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

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


Loading…
Cancel
Save