mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-15 21:29:30 +00:00
Code cleanup
This commit is contained in:
parent
cc81b588eb
commit
c0d6e66afe
|
@ -281,15 +281,13 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info)
|
||||||
// Copies result into a map sorted by operation name
|
// Copies result into a map sorted by operation name
|
||||||
PbOperationMetaData *unknown_operation = new PbOperationMetaData();
|
PbOperationMetaData *unknown_operation = new PbOperationMetaData();
|
||||||
map<string, PbOperationMetaData> sorted_operations;
|
map<string, PbOperationMetaData> sorted_operations;
|
||||||
auto iter = operations.begin();
|
for (const auto& operation : operations) {
|
||||||
while (iter != operations.end()) {
|
if (PbOperation_IsValid(static_cast<PbOperation>(operation.first))) {
|
||||||
if (PbOperation_IsValid(static_cast<PbOperation>(iter->first))) {
|
sorted_operations[PbOperation_Name(static_cast<PbOperation>(operation.first))] = operation.second;
|
||||||
sorted_operations[PbOperation_Name(static_cast<PbOperation>(iter->first))] = iter->second;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sorted_operations[iter->second.name()] = *unknown_operation;
|
sorted_operations[operation.second.name()] = *unknown_operation;
|
||||||
}
|
}
|
||||||
iter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Remote operations supported by rascsi and their parameters:" << endl;
|
cout << "Remote operations supported by rascsi and their parameters:" << endl;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user