https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114721

            Bug ID: 114721
           Summary: libstdc++-v3/include/ext/codecvt_specializations.h: 2
                    * small performance tweeks
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Static analyser cppcheck says:

1.

libstdc++-v3/include/ext/codecvt_specializations.h:142:5: performance: Function
'external_encoding()' should return member '_M_ext_enc' by const reference.
[returnByReference]

Source code is

    const std::string
    external_encoding() const
    { return _M_ext_enc; }

2.

libstdc++-v3/include/ext/codecvt_specializations.h:134:5: performance: Function
'internal_encoding()' should return member '_M_int_enc' by const reference.
[returnByReference]

Duplicate.

Reply via email to