@@ -152,17 +152,17 @@ namespace RE
152152
153153 void reset () noexcept { _handle.reset (); }
154154
155- [[nodiscard]] NiPointer<T> get () const
155+ [[nodiscard]] NiPointer<T> get ()
156156 {
157157 NiPointer<T> ptr;
158158 get_smartptr (ptr);
159159 return ptr;
160160 }
161161
162- [[nodiscard]] NiPointer<T> getsafe () const
162+ [[nodiscard]] NiPointer<T> get () const
163163 {
164164 NiPointer<T> ptr;
165- get_validated_smartptr (ptr);
165+ get_smartptr (ptr);
166166 return ptr;
167167 }
168168
@@ -185,8 +185,8 @@ namespace RE
185185 friend class BSPointerHandle ;
186186
187187 void get_handle (T* a_ptr);
188+ bool get_smartptr (NiPointer<T>& a_smartPointerOut);
188189 bool get_smartptr (NiPointer<T>& a_smartPointerOut) const ;
189- bool get_validated_smartptr (NiPointer<T>& a_smartPointerOut) const ;
190190
191191 Handle _handle;
192192 };
@@ -222,17 +222,17 @@ namespace RE
222222 return func (a_ptr);
223223 }
224224
225- static bool GetSmartPointer (const BSPointerHandle<T>& a_handle, NiPointer<T>& a_smartPointerOut)
225+ static bool GetSmartPointer (BSPointerHandle<T>& a_handle, NiPointer<T>& a_smartPointerOut) // clears the handle
226226 {
227- using func_t = decltype (&BSPointerHandleManagerInterface<T, Manager>::GetSmartPointer );
228- static REL::Relocation<func_t > func{ RELOCATION_ID (12204 , 12332 ) };
227+ using func_t = bool (*)(BSPointerHandle<T>&, NiPointer<T>& );
228+ static REL::Relocation<func_t > func{ RELOCATION_ID (12785 , 12922 ) };
229229 return func (a_handle, a_smartPointerOut);
230230 }
231231
232- static bool GetHandleValidatedSmartPointer (const BSPointerHandle<T>& a_handle, NiPointer<T>& a_smartPointerOut)
232+ static bool GetSmartPointer (const BSPointerHandle<T>& a_handle, NiPointer<T>& a_smartPointerOut)
233233 {
234- using func_t = decltype (&BSPointerHandleManagerInterface<T, Manager>::GetHandleValidatedSmartPointer );
235- static REL::Relocation<func_t > func{ RELOCATION_ID (12785 , 12922 ) };
234+ using func_t = bool (*)( const BSPointerHandle<T>&, NiPointer<T>& );
235+ static REL::Relocation<func_t > func{ RELOCATION_ID (12204 , 12332 ) };
236236 return func (a_handle, a_smartPointerOut);
237237 }
238238 };
@@ -248,14 +248,14 @@ namespace RE
248248 }
249249
250250 template <class T , class Handle >
251- bool BSPointerHandle<T, Handle>::get_smartptr(NiPointer<T>& a_smartPointerOut) const
251+ bool BSPointerHandle<T, Handle>::get_smartptr(NiPointer<T>& a_smartPointerOut)
252252 {
253253 return BSPointerHandleManagerInterface<T>::GetSmartPointer (*this , a_smartPointerOut);
254254 }
255255
256256 template <class T , class Handle >
257- bool BSPointerHandle<T, Handle>::get_validated_smartptr (NiPointer<T>& a_smartPointerOut) const
257+ bool BSPointerHandle<T, Handle>::get_smartptr (NiPointer<T>& a_smartPointerOut) const
258258 {
259- return BSPointerHandleManagerInterface<T>::GetHandleValidatedSmartPointer (*this , a_smartPointerOut);
259+ return BSPointerHandleManagerInterface<T>::GetSmartPointer (*this , a_smartPointerOut);
260260 }
261261}
0 commit comments