Mercurial > octave
changeset 27996:1998edbd4490
eliminate useless conversion of std::string.c_str back to std::string
* lo-array-errwarn.cc (index_exception::message): Don't call c_str() on
message string only to convert it back to std::string when returning
from function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 Jan 2020 16:19:33 -0500 |
parents | 534684fb7bd7 |
children | e90e3155cd01 |
files | liboctave/util/lo-array-errwarn.cc |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/lo-array-errwarn.cc Fri Jan 24 16:10:25 2020 +0900 +++ b/liboctave/util/lo-array-errwarn.cc Thu Jan 23 16:19:33 2020 -0500 @@ -125,8 +125,7 @@ std::string index_exception::message (void) const { - std::string msg = expression () + ": " + details (); - return msg.c_str (); + return expression () + ": " + details (); } // Show the expression that caused the error, e.g., "A(-1,_)",