1
This commit is contained in:
parent
68a8c14305
commit
64107a5b13
@ -206,8 +206,8 @@ void GSMgr::___GSList(std::shared_ptr<f8::JsonHttpRequest> request)
|
||||
{
|
||||
auto node_list = a8::MutableXObject::CreateArray();
|
||||
|
||||
for (auto& pair : sorted_node_hash_) {
|
||||
for (std::shared_ptr<GSNode> gs_node : pair.second) {
|
||||
for (auto itr = sorted_node_hash_.rbegin(); itr != sorted_node_hash_.rend(); ++itr) {
|
||||
for (std::shared_ptr<GSNode> gs_node : itr->second) {
|
||||
auto node = a8::MutableXObject::CreateObject();
|
||||
node->SetVal("node_id", gs_node->node_id);
|
||||
node->SetVal("instance_id", gs_node->instance_id);
|
||||
@ -360,11 +360,10 @@ std::vector<std::shared_ptr<GSNode>>* GSMgr::GetSortedNodes()
|
||||
if (sorted_node_hash_.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
std::vector<std::shared_ptr<GSNode>>* result = nullptr;
|
||||
for (auto& pair : sorted_node_hash_) {
|
||||
result = &pair.second;
|
||||
for (auto itr = sorted_node_hash_.rbegin(); itr != sorted_node_hash_.rend(); ++itr) {
|
||||
return &itr->second;
|
||||
}
|
||||
return result;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GSMgr::OnVersionChange(std::shared_ptr<GSNode> node)
|
||||
|
Loading…
x
Reference in New Issue
Block a user