parent
8aec5f6726
commit
992a0c3d7a
@ -93,8 +93,6 @@ namespace PerlUtils {
|
|||||||
extern std::string path_to_parent_path(const char *src);
|
extern std::string path_to_parent_path(const char *src);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string string_printf(const char *format, ...);
|
|
||||||
|
|
||||||
// Standard "generated by Slic3r version xxx timestamp xxx" header string,
|
// Standard "generated by Slic3r version xxx timestamp xxx" header string,
|
||||||
// to be placed at the top of Slic3r generated files.
|
// to be placed at the top of Slic3r generated files.
|
||||||
std::string header_slic3r_generated();
|
std::string header_slic3r_generated();
|
||||||
|
@ -577,24 +577,6 @@ namespace PerlUtils {
|
|||||||
std::string path_to_parent_path(const char *src) { return boost::filesystem::path(src).parent_path().string(); }
|
std::string path_to_parent_path(const char *src) { return boost::filesystem::path(src).parent_path().string(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
std::string string_printf(const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args1;
|
|
||||||
va_start(args1, format);
|
|
||||||
va_list args2;
|
|
||||||
va_copy(args2, args1);
|
|
||||||
|
|
||||||
size_t needed_size = ::vsnprintf(nullptr, 0, format, args1) + 1;
|
|
||||||
va_end(args1);
|
|
||||||
|
|
||||||
std::string res(needed_size, '\0');
|
|
||||||
::vsnprintf(&res.front(), res.size(), format, args2);
|
|
||||||
va_end(args2);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string header_slic3r_generated()
|
std::string header_slic3r_generated()
|
||||||
{
|
{
|
||||||
return std::string("generated by " SLIC3R_APP_NAME " " SLIC3R_VERSION " on " ) + Utils::utc_timestamp();
|
return std::string("generated by " SLIC3R_APP_NAME " " SLIC3R_VERSION " on " ) + Utils::utc_timestamp();
|
||||||
|
Loading…
Reference in New Issue
Block a user