Motivation
src/Methcla/Audio/Resource.hpp declares a family of refcount + resource-map helpers that are not used anywhere in the codebase. They predate the current implementation; the engine grew past them without anything referencing them, and the file is now load-bearing only as a place that compiles.
Independent of any larger design work — the dead code can be removed on its own.
Dead declarations to remove
All within src/Methcla/Audio/Resource.hpp:
Reference (refcounted base class). Not inherited by Node, Synth, Group, AudioBus, or anything else.
Resource<Id> template (refcount + env + id). Zero call sites outside the header.
ResourceMap<Id, T> (pointer map). Zero call sites — the engine uses plain std::vector<Node*> / std::vector<std::shared_ptr<AudioBus>> instead.
ResourceRef<T> (alias for methcla_boost::intrusive_ptr<T>). Zero call sites.
intrusive_ptr_add_ref / intrusive_ptr_release template helpers. Only meaningful with the deleted types.
Verified via:
grep -rn "class Resource<\|: Reference\b\|: Resource<\|ResourceMap\b\|ResourceRef\b" src/ include/ tests/ plugins/ examples/
Only matches are the declarations themselves.
Renames in include/methcla/engine.hpp
The actually-used class in the same conceptual area:
ResourceIdAllocator<Id, T> → IdAllocator<Id, T>. Currently instantiated as NodeIdAllocator and AudioBusIdAllocator (public typedefs at include/methcla/engine.hpp:620-621); the typedef names are preserved, only the underlying template is renamed.
The rename is independent justification: the class is a general-purpose id allocator, not specific to any "resource" concept.
Files affected
src/Methcla/Audio/Resource.hpp — remove dead declarations. If the file becomes empty, delete it (and its inclusions, if any).
include/methcla/engine.hpp — rename ResourceIdAllocator → IdAllocator; preserve the NodeIdAllocator and AudioBusIdAllocator typedef names.
Scope
In scope: deletion + the one rename above.
Out of scope: the wider Resource system design in #147. That work depends on these names being freed up, but the cleanup stands on its own merits and can be merged independently.
Motivation
src/Methcla/Audio/Resource.hppdeclares a family of refcount + resource-map helpers that are not used anywhere in the codebase. They predate the current implementation; the engine grew past them without anything referencing them, and the file is now load-bearing only as a place that compiles.Independent of any larger design work — the dead code can be removed on its own.
Dead declarations to remove
All within
src/Methcla/Audio/Resource.hpp:Reference(refcounted base class). Not inherited byNode,Synth,Group,AudioBus, or anything else.Resource<Id>template (refcount + env + id). Zero call sites outside the header.ResourceMap<Id, T>(pointer map). Zero call sites — the engine uses plainstd::vector<Node*>/std::vector<std::shared_ptr<AudioBus>>instead.ResourceRef<T>(alias formethcla_boost::intrusive_ptr<T>). Zero call sites.intrusive_ptr_add_ref/intrusive_ptr_releasetemplate helpers. Only meaningful with the deleted types.Verified via:
Only matches are the declarations themselves.
Renames in
include/methcla/engine.hppThe actually-used class in the same conceptual area:
ResourceIdAllocator<Id, T>→IdAllocator<Id, T>. Currently instantiated asNodeIdAllocatorandAudioBusIdAllocator(public typedefs atinclude/methcla/engine.hpp:620-621); the typedef names are preserved, only the underlying template is renamed.The rename is independent justification: the class is a general-purpose id allocator, not specific to any "resource" concept.
Files affected
src/Methcla/Audio/Resource.hpp— remove dead declarations. If the file becomes empty, delete it (and its inclusions, if any).include/methcla/engine.hpp— renameResourceIdAllocator→IdAllocator; preserve theNodeIdAllocatorandAudioBusIdAllocatortypedef names.Scope
In scope: deletion + the one rename above.
Out of scope: the wider Resource system design in #147. That work depends on these names being freed up, but the cleanup stands on its own merits and can be merged independently.