D28745: Skip caching thumbnails on encrypted filesystems

Thiago Macieira noreply at phabricator.kde.org
Sun Aug 23 15:52:17 BST 2020


thiago added inline comments.

INLINE COMMENTS

> marcingu wrote in thumbnail.cpp:776
> "-1 isn't exactly a great value for an unsigned int :-)"
> 
> I believe "-1" guaranties unsigned to be set to its maximum value, due to how type conversion works, but I could be wrong.
> 
> Do you know if size of dev_st is fixed or depends on architecture? I'd like to define const rather than use literals for checks, but I don't know if I can simply define it as 0xFFFFFFFF or if it's more complicated.

unsigned(-1)

is guaranteed to be added to the modulo value until it becomes positive. That is, it is

  (UINT_MAX + 1) - 1

Note that this will generate a warning with some compilers about change of sign, so either make the cast explicit or simply use ~0U.

As for what type it is... that's why we have std::numeric_limits.

REPOSITORY
  R320 KIO Extras

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

To: marcingu, ivan, broulik, #dolphin, ngraham, meven, bruns, dfaure
Cc: dfaure, thiago, bruns, meven, ngraham, kde-frameworks-devel, kfm-devel, waitquietly, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, LeGast00n, cblack, fbampaloukas, alexde, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200823/4a930bdb/attachment.htm>


More information about the kfm-devel mailing list