Commit 9f53ecd1 authored by Deepak Rangarajan's avatar Deepak Rangarajan Committed by Mark Meredith
Browse files

pass map by reference

parent 0a27b2c3
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -544,9 +544,9 @@ template <> struct action<hull> {
  }
};

std::optional<std::string> get_name(AttrMap curr_attr) {
std::optional<std::string> get_name(const AttrMap &curr_attr) {
  if (curr_attr.count("$name")) {
    auto quoted_name = std::get<std::string>(curr_attr["$name"]);
    auto quoted_name = std::get<std::string>(curr_attr.find("$name")->second);
    auto name = quoted_name.substr(1, quoted_name.length() - 2);
    return name;
  }