bullet: Fix BulletWheel::empty() referencing local objects

This commit is contained in:
rdb 2022-10-25 12:08:06 +02:00
parent cc24b5373d
commit ef9c9fa20e
3 changed files with 14 additions and 15 deletions

View File

@ -26,17 +26,3 @@ INLINE BulletWheelRaycastInfo::
~BulletWheelRaycastInfo() {
}
/**
* Named constructor intended to be used for asserts with have to return a
* concrete value.
*/
INLINE BulletWheel BulletWheel::
empty() {
btWheelInfoConstructionInfo ci {};
btWheelInfo info(ci);
return BulletWheel(info);
}

View File

@ -23,6 +23,19 @@ BulletWheel(btWheelInfo &info) : _info(info) {
}
/**
* Named constructor intended to be used for asserts with have to return a
* concrete value.
*/
BulletWheel BulletWheel::
empty() {
static btWheelInfoConstructionInfo ci {};
static btWheelInfo info(ci);
return BulletWheel(info);
}
/**
*
*/

View File

@ -143,7 +143,7 @@ PUBLISHED:
public:
BulletWheel(btWheelInfo &info);
INLINE static BulletWheel empty();
static BulletWheel empty();
private:
btWheelInfo &_info;