mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-19 12:14:20 -04:00
Fix compilation
Summary: Seems only gcc can do a constexpr with strlen. This fixes the build with clang, hopefully to with MSVC? Reviewers: svuorela Reviewed By: svuorela Subscribers: svuorela, apol, pino, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20149
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#include <QFile>
|
||||
|
||||
static constexpr char s_magic[] = "application/x-krita";
|
||||
static constexpr int s_magic_size = strlen(s_magic);
|
||||
static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0
|
||||
|
||||
KraHandler::KraHandler()
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <kzip.h>
|
||||
|
||||
static constexpr char s_magic[] = "image/openraster";
|
||||
static constexpr int s_magic_size = strlen(s_magic);
|
||||
static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0
|
||||
|
||||
OraHandler::OraHandler()
|
||||
{
|
||||
|
Reference in New Issue
Block a user