summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index c29e7d2cc..e331ba9dc 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -331,7 +331,7 @@ unsigned long InspIRCd::Duration(const std::string &str)
return total + subtotal;
}
-const char* InspIRCd::Format(va_list &vaList, const char* formatString)
+std::string InspIRCd::Format(va_list& vaList, const char* formatString)
{
static std::vector<char> formatBuffer(1024);
@@ -351,12 +351,12 @@ const char* InspIRCd::Format(va_list &vaList, const char* formatString)
formatBuffer.resize(formatBuffer.size() * 2);
}
- return &formatBuffer[0];
+ return std::string(&formatBuffer[0]);
}
-const char* InspIRCd::Format(const char* formatString, ...)
+std::string InspIRCd::Format(const char* formatString, ...)
{
- const char* ret;
+ std::string ret;
VAFORMAT(ret, formatString, formatString);
return ret;
}