Skip to content

Commit

Permalink
api: remove: deprecated jule::new_struct<T> and jule::new_struct_ptr<…
Browse files Browse the repository at this point in the history
…T> functions
  • Loading branch information
mertcandav committed Mar 27, 2024
1 parent 45db99e commit 1d5430e
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions api/misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,6 @@ namespace jule
{
return x % denominator;
}

template <typename T>
inline jule::Ptr<T> new_struct(T *p) noexcept
{
#ifndef __JULE_DISABLE__REFERENCE_COUNTING
return jule::Ptr<T>::make(p);
#else
return jule::Ptr<T>::make(p, nullptr);
#endif
}

template <typename T>
inline jule::Ptr<T> new_struct_ptr(T *p) noexcept
{
#ifndef __JULE_DISABLE__REFERENCE_COUNTING
p->self = nullptr;
jule::Ptr<T> rp = jule::new_struct<T>(p);
rp->self.alloc = rp.alloc;
rp->self.ref = rp.ref;
*rp->self.ref = jule::REFERENCE_DELTA;
return rp;
#else
return jule::new_struct<T>(p);
#endif
}
} // namespace jule

#endif // ifndef __JULE_MISC_HPP

0 comments on commit 1d5430e

Please sign in to comment.