diff options
Diffstat (limited to 'src/audio_core/splitter_context.cpp')
| -rw-r--r-- | src/audio_core/splitter_context.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/audio_core/splitter_context.cpp b/src/audio_core/splitter_context.cpp index f21b53147..f4bcd0391 100644 --- a/src/audio_core/splitter_context.cpp +++ b/src/audio_core/splitter_context.cpp | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | namespace AudioCore { | 11 | namespace AudioCore { |
| 12 | 12 | ||
| 13 | ServerSplitterDestinationData::ServerSplitterDestinationData(s32 id) : id(id) {} | 13 | ServerSplitterDestinationData::ServerSplitterDestinationData(s32 id_) : id{id_} {} |
| 14 | ServerSplitterDestinationData::~ServerSplitterDestinationData() = default; | 14 | ServerSplitterDestinationData::~ServerSplitterDestinationData() = default; |
| 15 | 15 | ||
| 16 | void ServerSplitterDestinationData::Update(SplitterInfo::InDestinationParams& header) { | 16 | void ServerSplitterDestinationData::Update(SplitterInfo::InDestinationParams& header) { |
| @@ -87,7 +87,7 @@ void ServerSplitterDestinationData::UpdateInternalState() { | |||
| 87 | needs_update = false; | 87 | needs_update = false; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | ServerSplitterInfo::ServerSplitterInfo(s32 id) : id(id) {} | 90 | ServerSplitterInfo::ServerSplitterInfo(s32 id_) : id(id_) {} |
| 91 | ServerSplitterInfo::~ServerSplitterInfo() = default; | 91 | ServerSplitterInfo::~ServerSplitterInfo() = default; |
| 92 | 92 | ||
| 93 | void ServerSplitterInfo::InitializeInfos() { | 93 | void ServerSplitterInfo::InitializeInfos() { |
| @@ -121,7 +121,7 @@ const ServerSplitterDestinationData* ServerSplitterInfo::GetHead() const { | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | ServerSplitterDestinationData* ServerSplitterInfo::GetData(std::size_t depth) { | 123 | ServerSplitterDestinationData* ServerSplitterInfo::GetData(std::size_t depth) { |
| 124 | auto current_head = head; | 124 | auto* current_head = head; |
| 125 | for (std::size_t i = 0; i < depth; i++) { | 125 | for (std::size_t i = 0; i < depth; i++) { |
| 126 | if (current_head == nullptr) { | 126 | if (current_head == nullptr) { |
| 127 | return nullptr; | 127 | return nullptr; |
| @@ -132,7 +132,7 @@ ServerSplitterDestinationData* ServerSplitterInfo::GetData(std::size_t depth) { | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | const ServerSplitterDestinationData* ServerSplitterInfo::GetData(std::size_t depth) const { | 134 | const ServerSplitterDestinationData* ServerSplitterInfo::GetData(std::size_t depth) const { |
| 135 | auto current_head = head; | 135 | auto* current_head = head; |
| 136 | for (std::size_t i = 0; i < depth; i++) { | 136 | for (std::size_t i = 0; i < depth; i++) { |
| 137 | if (current_head == nullptr) { | 137 | if (current_head == nullptr) { |
| 138 | return nullptr; | 138 | return nullptr; |
| @@ -245,7 +245,7 @@ ServerSplitterDestinationData* SplitterContext::GetDestinationData(std::size_t i | |||
| 245 | const ServerSplitterDestinationData* SplitterContext::GetDestinationData(std::size_t info, | 245 | const ServerSplitterDestinationData* SplitterContext::GetDestinationData(std::size_t info, |
| 246 | std::size_t data) const { | 246 | std::size_t data) const { |
| 247 | ASSERT(info < info_count); | 247 | ASSERT(info < info_count); |
| 248 | auto& cur_info = GetInfo(info); | 248 | const auto& cur_info = GetInfo(info); |
| 249 | return cur_info.GetData(data); | 249 | return cur_info.GetData(data); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| @@ -267,11 +267,11 @@ std::size_t SplitterContext::GetDataCount() const { | |||
| 267 | return data_count; | 267 | return data_count; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | void SplitterContext::Setup(std::size_t _info_count, std::size_t _data_count, | 270 | void SplitterContext::Setup(std::size_t info_count_, std::size_t data_count_, |
| 271 | bool is_splitter_bug_fixed) { | 271 | bool is_splitter_bug_fixed) { |
| 272 | 272 | ||
| 273 | info_count = _info_count; | 273 | info_count = info_count_; |
| 274 | data_count = _data_count; | 274 | data_count = data_count_; |
| 275 | 275 | ||
| 276 | for (std::size_t i = 0; i < info_count; i++) { | 276 | for (std::size_t i = 0; i < info_count; i++) { |
| 277 | auto& splitter = infos.emplace_back(static_cast<s32>(i)); | 277 | auto& splitter = infos.emplace_back(static_cast<s32>(i)); |
| @@ -364,7 +364,7 @@ bool SplitterContext::RecomposeDestination(ServerSplitterInfo& info, | |||
| 364 | // Clear our current destinations | 364 | // Clear our current destinations |
| 365 | auto* current_head = info.GetHead(); | 365 | auto* current_head = info.GetHead(); |
| 366 | while (current_head != nullptr) { | 366 | while (current_head != nullptr) { |
| 367 | auto next_head = current_head->GetNextDestination(); | 367 | auto* next_head = current_head->GetNextDestination(); |
| 368 | current_head->SetNextDestination(nullptr); | 368 | current_head->SetNextDestination(nullptr); |
| 369 | current_head = next_head; | 369 | current_head = next_head; |
| 370 | } | 370 | } |
| @@ -471,8 +471,8 @@ bool NodeStates::DepthFirstSearch(EdgeMatrix& edge_matrix) { | |||
| 471 | continue; | 471 | continue; |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | const auto node_count = edge_matrix.GetNodeCount(); | 474 | const auto edge_node_count = edge_matrix.GetNodeCount(); |
| 475 | for (s32 j = 0; j < static_cast<s32>(node_count); j++) { | 475 | for (s32 j = 0; j < static_cast<s32>(edge_node_count); j++) { |
| 476 | // Check if our node is connected to our edge matrix | 476 | // Check if our node is connected to our edge matrix |
| 477 | if (!edge_matrix.Connected(current_stack_index, j)) { | 477 | if (!edge_matrix.Connected(current_stack_index, j)) { |
| 478 | continue; | 478 | continue; |