Commit 89235dea authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Code cleanup

parent 8374ce73
...@@ -355,7 +355,7 @@ typedef struct nf_service_s { ...@@ -355,7 +355,7 @@ typedef struct nf_service_s {
s.append(service_instance_id); s.append(service_instance_id);
s.append(", Service name: "); s.append(", Service name: ");
s.append(service_name); s.append(service_name);
for (auto v : versions) { for (const auto& v : versions) {
s.append(v.to_string()); s.append(v.to_string());
} }
s.append(", Scheme: "); s.append(", Scheme: ");
...@@ -393,13 +393,13 @@ typedef struct dnn_upf_info_item_s { ...@@ -393,13 +393,13 @@ typedef struct dnn_upf_info_item_s {
std::string to_string() const { std::string to_string() const {
std::string s = {}; std::string s = {};
s.append("DNN = " + dnn + ", "); s.append("DNN = ").append(dnn).append(", ");
if (dnai_list.size() > 0) { if (dnai_list.size() > 0) {
s.append("DNAI list: {"); s.append("DNAI list: {");
for (auto dnai : dnai_list) { for (const auto& dnai : dnai_list) {
s.append("DNAI = " + dnai + ", "); s.append("DNAI = ").append(dnai).append(", ");
} }
s.append("}, "); s.append("}, ");
} }
...@@ -407,8 +407,8 @@ typedef struct dnn_upf_info_item_s { ...@@ -407,8 +407,8 @@ typedef struct dnn_upf_info_item_s {
if (dnai_nw_instance_list.size() > 0) { if (dnai_nw_instance_list.size() > 0) {
s.append("DNAI NW Instance list: {"); s.append("DNAI NW Instance list: {");
for (auto dnai_nw : dnai_nw_instance_list) { for (const auto& dnai_nw : dnai_nw_instance_list) {
s.append("(" + dnai_nw.first + ", " + dnai_nw.second + "),"); s.append("(").append(dnai_nw.first).append(", ").append(dnai_nw.second).append("),");
} }
s.append("}, "); s.append("}, ");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment