Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10a6246

Browse files
nehebwilx
authored andcommitted
[clang-tidy] Match references
Found with performance-unnecessary-copy-initialization (cherry picked from commit f69468d) Signed-off-by: Vaclav Haisman <[email protected]>
1 parent 0a7d801 commit 10a6246

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/clfsappender.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ CLFSAppender::CLFSAppender (helpers::Properties const & props)
9393
: Appender (props)
9494
, data (new Data)
9595
{
96-
tstring logname = props.getProperty (LOG4CPLUS_TEXT ("LogName"));
96+
const tstring& logname = props.getProperty (LOG4CPLUS_TEXT ("LogName"));
9797

9898
unsigned long logsize = CLFS_APPENDER_INITIAL_LOG_SIZE;
9999
props.getULong (logsize, LOG4CPLUS_TEXT ("LogSize"));

src/filter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ FilterResult MDCMatchFilter::decide(const InternalLoggingEvent& event) const
341341
if(neutralOnEmpty && (mdcKeyToMatch.empty() || mdcValueToMatch.empty()))
342342
return NEUTRAL;
343343

344-
const tstring mdcStr = event.getMDC(mdcKeyToMatch);
344+
const tstring& mdcStr = event.getMDC(mdcKeyToMatch);
345345

346346
if(neutralOnEmpty && mdcStr.empty())
347347
return NEUTRAL;

0 commit comments

Comments
 (0)