Fixed clang warning in qt_sinks.h

This commit is contained in:
gabime 2023-06-17 18:32:47 +03:00
parent b1eb4953fa
commit b85c509ec6

View File

@ -49,7 +49,7 @@ protected:
{
memory_buf_t formatted;
base_sink<Mutex>::formatter_->format(msg, formatted);
string_view_t str = string_view_t(formatted.data(), formatted.size());
const string_view_t str = string_view_t(formatted.data(), formatted.size());
QMetaObject::invokeMethod(qt_object_, meta_method_.c_str(), Qt::AutoConnection,
Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed()));
}