Remove memory allocations in some hot paths
This commit is contained in:
parent
e3122c5b46
commit
5da70f7197
84 changed files with 501 additions and 458 deletions
|
@ -134,8 +134,8 @@ u32 NodeStates::GetNodeCount() const {
|
|||
return node_count;
|
||||
}
|
||||
|
||||
std::vector<s32> NodeStates::GetSortedResuls() const {
|
||||
return {results.rbegin(), results.rbegin() + result_pos};
|
||||
std::pair<std::span<u32>::reverse_iterator, size_t> NodeStates::GetSortedResuls() const {
|
||||
return {results.rbegin(), result_pos};
|
||||
}
|
||||
|
||||
} // namespace AudioCore::AudioRenderer
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
*
|
||||
* @return Vector of nodes in reverse order.
|
||||
*/
|
||||
std::vector<s32> GetSortedResuls() const;
|
||||
std::pair<std::span<u32>::reverse_iterator, size_t> GetSortedResuls() const;
|
||||
|
||||
private:
|
||||
/// Number of nodes in the graph
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue