mirror of https://github.com/minetest/minetest.git
no stringc
This commit is contained in:
parent
0ec974d0f5
commit
3ed0e71c4c
|
@ -19,8 +19,8 @@ namespace video
|
||||||
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
|
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));
|
io::IReadFile *file = reinterpret_cast<io::IReadFile *>(png_get_error_ptr(png_ptr));
|
||||||
core::stringc logmsg = core::stringc("PNG fatal error for ") + file->getFileName()
|
std::string logmsg = std::string("PNG fatal error for ")
|
||||||
+ ": " + msg;
|
+ file->getFileName().c_str() + ": " + msg;
|
||||||
os::Printer::log(logmsg.c_str(), ELL_ERROR);
|
os::Printer::log(logmsg.c_str(), ELL_ERROR);
|
||||||
longjmp(png_jmpbuf(png_ptr), 1);
|
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)
|
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));
|
io::IReadFile *file = reinterpret_cast<io::IReadFile *>(png_get_error_ptr(png_ptr));
|
||||||
core::stringc logmsg = core::stringc("PNG warning for ") + file->getFileName()
|
std::string logmsg = std::string("PNG warning for ")
|
||||||
+ ": " + msg;
|
+ file->getFileName().c_str() + ": " + msg;
|
||||||
os::Printer::log(logmsg.c_str(), ELL_WARNING);
|
os::Printer::log(logmsg.c_str(), ELL_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ IImageWriter *createImageWriterPNG()
|
||||||
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
|
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));
|
io::IWriteFile *file = reinterpret_cast<io::IWriteFile *>(png_get_error_ptr(png_ptr));
|
||||||
core::stringc logmsg = core::stringc("PNG fatal error for ") + file->getFileName()
|
std::string logmsg = std::string("PNG fatal error for ")
|
||||||
+ ": " + msg;
|
+ file->getFileName().c_str() + ": " + msg;
|
||||||
os::Printer::log(logmsg.c_str(), ELL_ERROR);
|
os::Printer::log(logmsg.c_str(), ELL_ERROR);
|
||||||
longjmp(png_jmpbuf(png_ptr), 1);
|
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)
|
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));
|
io::IWriteFile *file = reinterpret_cast<io::IWriteFile *>(png_get_error_ptr(png_ptr));
|
||||||
core::stringc logmsg = core::stringc("PNG warning for ") + file->getFileName()
|
std::string logmsg = std::string("PNG warning for ")
|
||||||
+ ": " + msg;
|
+ file->getFileName().c_str() + ": " + msg;
|
||||||
os::Printer::log(logmsg.c_str(), ELL_WARNING);
|
os::Printer::log(logmsg.c_str(), ELL_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue