D14479: Store sizeof and friends as numbers instead of comment.

Aaron Puchert noreply at phabricator.kde.org
Fri Aug 10 01:08:54 BST 2018


aaronpuchert accepted this revision.
aaronpuchert added a comment.
This revision is now accepted and ready to land.


  Otherwise it's fine.

INLINE COMMENTS

> classmemberdeclaration.cpp:191
> +    d_func_dynamic()->m_alignOfExponent = ClassMemberDeclarationData::MaxAlignOfExponent;
> +  }
> +

I guess you meant to return here.

> classmemberdeclaration.cpp:193
> +
> +  int alignOfExponent = 0;
> +  while (alignedTo > 1) {

Make this unsigned to avoid signed -> unsigned conversion when storing the value.

> classmemberdeclaration.cpp:194-197
> +  while (alignedTo > 1) {
> +    alignOfExponent++;
> +    alignedTo >>= 1;
> +  }

Can be slightly simplified, because we know here that `alignedTo != 0`:

  while (alignedTo >>= 1)
    alignOfExponent++;

REPOSITORY
  R32 KDevelop

BRANCH
  master

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

To: michalsrb, #kdevelop, aaronpuchert
Cc: aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180810/5eb3bfc8/attachment.html>


More information about the KDevelop-devel mailing list