Opened 6 years ago

Closed 5 years ago

#12453 closed Bugs (fixed)

libs/locale/src/shared/message.cpp: 4 * inefficient code ?

Reported by: dcb314@… Owned by: Artyom Beilis
Milestone: To Be Determined Component: locale
Version: Boost 1.61.0 Severity: Optimization
Keywords: Cc:

Description

libs/locale/src/shared/message.cpp:691]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

libs/locale/src/shared/message.cpp:691]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 2 is slow and redundant.

Source code is

if(compare_encodings(mo_encoding.c_str(),locale_encoding_.c_str())!=0)

Also

libs/locale/src/shared/message.cpp:693]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. libs/locale/src/shared/message.cpp:693]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

Change History (2)

comment:1 by John Maddock, 6 years ago

Component: Nonelocale
Owner: set to Artyom Beilis

comment:2 by Artyom Beilis, 5 years ago

Resolution: fixed
Status: newclosed

in develop

Note: See TracTickets for help on using tickets.