[Boost-bugs] [Boost C++ Libraries] #12453: libs/locale/src/shared/message.cpp: 4 * inefficient code ?

Subject: [Boost-bugs] [Boost C++ Libraries] #12453: libs/locale/src/shared/message.cpp: 4 * inefficient code ?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-13 20:02:50


#12453: libs/locale/src/shared/message.cpp: 4 * inefficient code ?
--------------------------+------------------------------
 Reporter: dcb314@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.61.0
 Severity: Optimization | Keywords:
--------------------------+------------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12453>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC