D20149: Fix compilation

Aleix Pol Gonzalez noreply at phabricator.kde.org
Mon Apr 1 13:32:15 BST 2019


apol added inline comments.

INLINE COMMENTS

> ora.cpp:21
>  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
>  

Won't sizeof give the sizeof(char*)?

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D20149

To: aacid, svuorela
Cc: svuorela, apol, pino, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190401/f2946cc7/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list