From 115db95642ad6d861aad63775b92350e0491f2dd Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 10 Jan 2016 16:36:18 -0500 Subject: Return std::string objects by value rather than pass by reference - strprintf is unaltered, but strformat now takes one fewer argument - state_string_export still fills a buffer, but has been made const - get_default_card_software now takes no arguments but returns a string --- src/lib/util/corefile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/util/corefile.cpp') diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index a2242c133c6..344a2922bfe 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -909,7 +909,7 @@ file_error core_truncate(core_file *f, UINT64 offset) assumptions about path separators -------------------------------------------------*/ -std::string &core_filename_extract_base(std::string &result, const char *name, bool strip_extension) +std::string core_filename_extract_base(const char *name, bool strip_extension) { /* find the start of the name */ const char *start = name + strlen(name); @@ -917,7 +917,7 @@ std::string &core_filename_extract_base(std::string &result, const char *name, b start--; /* copy the rest into an astring */ - result.assign(start); + std::string result(start); /* chop the extension if present */ if (strip_extension) -- cgit v1.2.3-70-g09d2