ソースを参照

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年前
コミット
d9f2b07822
2個のファイルの変更3行の追加1行の削除
  1. +1
    -0
      src/input/controller.h
  2. +2
    -1
      src/sys/threadbase.h

+ 1
- 0
src/input/controller.h ファイルの表示

@@ -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 ファイルの表示

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


読み込み中…
キャンセル
保存