Use 'auto' to avoid implicit copies.
td_type is std::pair<std::string, std::string>, but the map returns elements of std::pair<const std::string, std::string>. In well-designed languages like C++ that yields an implicit copy perfectly hidden by constref's lifetime extension. Just use auto, the typedef obscured the real type anyways. Found with a little help from clang-tidy's performance-implicit-cast-in-loop. llvm-svn: 272519
Loading
Please register or sign in to comment