|
From: | dcb314 at hotmail dot com |
Subject: | [Bug gold/19793] script-sections.cc:1475: possible redundant string copy ? |
Date: | Sat, 12 Mar 2016 20:35:00 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19793 --- Comment #3 from dcb <dcb314 at hotmail dot com> --- >There are a few other places in gold where we should also pass by const >>reference instead of value for std::string. $ fgrep "src/gold" cppcheck.20160308.out | fgrep "(performance)" [src/gold/archive.cc:506]: (performance) Function parameter 'p' should be passed by reference. [src/gold/archive.cc:510]: (performance) Function parameter 'p' should be passed by reference. [src/gold/gc.h:203]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [src/gold/script-sections.cc:1475]: (performance) Function parameter 'name' should be passed by reference. $ -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |