Skip to content

Commit

Permalink
Use move semantics on strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mirenradia committed Aug 14, 2024
1 parent 18f4cad commit cd63616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_BLBackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ BLBackTrace::print_backtrace_info (FILE* f)
} else {
std::string eu_fallback_path = "/usr/bin/eu-addr2line";
have_eu_addr2line = file_exists(eu_fallback_path.c_str());
eu_cmd = eu_fallback_path;
eu_cmd = std::move(eu_fallback_path);
}
if (have_eu_addr2line) {
const pid_t pid = getpid();
Expand All @@ -244,7 +244,7 @@ BLBackTrace::print_backtrace_info (FILE* f)
} else {
std::string fallback_path = "/usr/bin/addr2line";
have_addr2line = file_exists(fallback_path.c_str());
cmd = fallback_path;
cmd = std::move(fallback_path);
}
if (have_addr2line) {
cmd += " -Cpfie " + amrex::system::exename;
Expand Down

0 comments on commit cd63616

Please sign in to comment.