replace sprintf for ostringstream(#1192)
@@ -99,10 +99,9 @@ struct Typestring {
public:
inline std::string str() {
- const size_t max_buflen = 16;
- char buf[max_buflen];
- std::sprintf(buf, "%c%c%u", c_endian, c_type, len);
- return std::string(buf);
+ std::ostringstream ss;
+ ss << c_endian << c_type << len;
+ return ss.str();
}
Typestring(const std::vector<float>& v)
