no stringc

This commit is contained in:
Desour 2024-04-07 14:35:32 +02:00
parent 0ec974d0f5
commit 3ed0e71c4c
2 changed files with 8 additions and 8 deletions

View File

@ -19,8 +19,8 @@ namespace video
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
{
io::IReadFile *file = reinterpret_cast<io::IReadFile *>(png_get_error_ptr(png_ptr));
core::stringc logmsg = core::stringc("PNG fatal error for ") + file->getFileName()
+ ": " + msg;
std::string logmsg = std::string("PNG fatal error for ")
+ file->getFileName().c_str() + ": " + msg;
os::Printer::log(logmsg.c_str(), ELL_ERROR);
longjmp(png_jmpbuf(png_ptr), 1);
}
@ -29,8 +29,8 @@ static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
static void png_cpexcept_warn(png_structp png_ptr, png_const_charp msg)
{
io::IReadFile *file = reinterpret_cast<io::IReadFile *>(png_get_error_ptr(png_ptr));
core::stringc logmsg = core::stringc("PNG warning for ") + file->getFileName()
+ ": " + msg;
std::string logmsg = std::string("PNG warning for ")
+ file->getFileName().c_str() + ": " + msg;
os::Printer::log(logmsg.c_str(), ELL_WARNING);
}

View File

@ -26,8 +26,8 @@ IImageWriter *createImageWriterPNG()
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
{
io::IWriteFile *file = reinterpret_cast<io::IWriteFile *>(png_get_error_ptr(png_ptr));
core::stringc logmsg = core::stringc("PNG fatal error for ") + file->getFileName()
+ ": " + msg;
std::string logmsg = std::string("PNG fatal error for ")
+ file->getFileName().c_str() + ": " + msg;
os::Printer::log(logmsg.c_str(), ELL_ERROR);
longjmp(png_jmpbuf(png_ptr), 1);
}
@ -36,8 +36,8 @@ static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
static void png_cpexcept_warning(png_structp png_ptr, png_const_charp msg)
{
io::IWriteFile *file = reinterpret_cast<io::IWriteFile *>(png_get_error_ptr(png_ptr));
core::stringc logmsg = core::stringc("PNG warning for ") + file->getFileName()
+ ": " + msg;
std::string logmsg = std::string("PNG warning for ")
+ file->getFileName().c_str() + ": " + msg;
os::Printer::log(logmsg.c_str(), ELL_WARNING);
}