mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:37:35 +00:00
LibDSP+Piano: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult. This commit is separate from the other Applications/Libraries changes because it required additional adaption of the code. Note that the old code did precisely what these changes try to prevent: Create and handle a ref-counted object with a refcount of zero.
This commit is contained in:
parent
25032a02aa
commit
52a1ff4d4b
2 changed files with 9 additions and 9 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
Track::Track(const u32& time)
|
||||
: m_time(time)
|
||||
, m_temporary_transport(make_ref_counted<LibDSP::Transport>(120, 4))
|
||||
, m_temporary_transport(LibDSP::Transport::construct(120, 4))
|
||||
, m_delay(make_ref_counted<LibDSP::Effects::Delay>(m_temporary_transport))
|
||||
{
|
||||
set_volume(volume_max);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue