rplight: compatibility with old macOS glibc
This commit is contained in:
parent
8f5d55c539
commit
bfd5fa56fa
|
|
@ -38,7 +38,14 @@ class PointerSlotStorage {};
|
|||
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
// Apple has an outdated libstdc++, so pull the class from TR1.
|
||||
#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
|
||||
#include <tr1/array>
|
||||
using std::tr1::array;
|
||||
#else
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Class to keep a list of pointers and nullpointers.
|
||||
|
|
@ -58,7 +65,11 @@ public:
|
|||
* initialized to a nullptr.
|
||||
*/
|
||||
PointerSlotStorage() {
|
||||
#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
|
||||
_data.assign(nullptr);
|
||||
#else
|
||||
_data.fill(nullptr);
|
||||
#endif
|
||||
_max_index = 0;
|
||||
_num_entries = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void PSSMCameraRig::init_cam_nodes() {
|
|||
lens->set_near_far(1, 1000);
|
||||
|
||||
// Construct a new camera
|
||||
_cameras[i] = new Camera("pssm-cam-" + to_string(((long long)i)), lens);
|
||||
_cameras[i] = new Camera("pssm-cam-" + format_string(i), lens);
|
||||
_cam_nodes.push_back(NodePath(_cameras[i]));
|
||||
_max_film_sizes[i].fill(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void ShadowManager::init() {
|
|||
for(size_t i = 0; i < _max_updates; ++i) {
|
||||
|
||||
// Create the camera
|
||||
PT(Camera) camera = new Camera("ShadowCam-" + to_string((long long)i));
|
||||
PT(Camera) camera = new Camera("ShadowCam-" + format_string(i));
|
||||
camera->set_lens(new MatrixLens());
|
||||
camera->set_active(false);
|
||||
camera->set_scene(_scene_parent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue