Fix possible leaks in stdext::format

This commit is contained in:
Eduardo Bart
2013-02-05 20:00:28 -02:00
parent dcd6249e8f
commit cf77df05ca
6 changed files with 9 additions and 8 deletions

View File

@@ -48,6 +48,7 @@ typename std::enable_if<std::is_integral<T>::value ||
std::is_pointer<T>::value ||
std::is_floating_point<T>::value ||
std::is_enum<T>::value, T>::type sprintf_cast(const T& t) { return t; }
inline const char *sprintf_cast(const char *s) { return s; }
inline const char *sprintf_cast(const std::string& s) { return s.c_str(); }
template<int N> struct expand_snprintf {