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/corestr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/util/corestr.cpp') diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp index 336d788cabb..ce5976869d4 100644 --- a/src/lib/util/corestr.cpp +++ b/src/lib/util/corestr.cpp @@ -217,14 +217,13 @@ int strprintf(std::string &str, const char *format, ...) return retVal; } -std::string strformat(std::string &str, const char *format, ...) +std::string strformat(const char *format, ...) { std::string retVal; va_list ap; va_start(ap, format); - strvprintf(str, format, ap); + strvprintf(retVal, format, ap); va_end(ap); - retVal.assign(str); return retVal; } -- cgit v1.2.3-70-g09d2