Replace lazy_ptr's Init() with reset() method
The function Init() called by one of the constructors of lazy_ptr is undefined. Replacing with reset method sets the object to an uninitialized state and assigns a new constructor function Fix submitted on github by zhoumin2 - https://github.com/ROCm/ROCR-Runtime/pull/184 Change-Id: I7d906d526ce7fe7e2548b01810e6395b13497bf3
This commit is contained in:
gecommit door
Shweta Khatri
bovenliggende
02a40e9272
commit
00b63f7452
@@ -59,7 +59,7 @@ template <typename T> class lazy_ptr {
|
||||
public:
|
||||
lazy_ptr() {}
|
||||
|
||||
explicit lazy_ptr(std::function<T*()> Constructor) { Init(Constructor); }
|
||||
explicit lazy_ptr(std::function<T*()> Constructor) { reset(Constructor); }
|
||||
|
||||
lazy_ptr(lazy_ptr&& rhs) {
|
||||
obj = std::move(rhs.obj);
|
||||
|
||||
Verwijs in nieuw issue
Block a user