C++: Preserve original channel ordering.
This commit is contained in:
parent
d9eed47d5b
commit
be43d5d584
|
@ -465,8 +465,10 @@ string Device::get_version()
|
||||||
vector<shared_ptr<Channel>> Device::get_channels()
|
vector<shared_ptr<Channel>> Device::get_channels()
|
||||||
{
|
{
|
||||||
vector<shared_ptr<Channel>> result;
|
vector<shared_ptr<Channel>> result;
|
||||||
for (auto entry : channels)
|
for (auto channel = structure->channels; channel; channel = channel->next)
|
||||||
result.push_back(entry.second->get_shared_pointer(get_shared_from_this()));
|
result.push_back(
|
||||||
|
channels[(struct sr_channel *) channel->data]->get_shared_pointer(
|
||||||
|
get_shared_from_this()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue