Skip to content

Commit

Permalink
Fix some complains in compilers about shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Dec 18, 2024
1 parent 035a759 commit b864597
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/data-model-providers/codegen/CodegenDataModelProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,12 @@ CodegenDataModelProvider::GetGeneratedCommands(ConcreteClusterPath clusterPath)
err = interface->EnumerateGeneratedCommands(
clusterPath,
[](CommandId commandId, void * context) -> Loop {
auto data = reinterpret_cast<FetchData *>(context);

if (data->index < data->maxSize)
auto fetchData = reinterpret_cast<FetchData *>(context);
if (fetchData->index < fetchData->maxSize)
{
data->commands[data->index] = commandId;
fetchData->commands[fetchData->index] = commandId;
}
data->index++;
fetchData->index++;
return Loop::Continue;
},
reinterpret_cast<void *>(&data));
Expand Down

0 comments on commit b864597

Please sign in to comment.