Review Request 127061: duchain: builder: display offsets in bytes

Alexandre Courbot gnurou at gmail.com
Mon Feb 15 00:13:55 UTC 2016



> On Feb. 14, 2016, 10:36 a.m., Milian Wolff wrote:
> > Yes, I had that on my todo for a long time. Is your format `"Bytes:Bits"` common? I've never seen it, but I don't often have to play around with bits ;-)

I don't think it's anything official but it should be understandable to people doing C and has the advantage of remaining concise. I can change this if you want though.


> On Feb. 14, 2016, 10:36 a.m., Milian Wolff wrote:
> > languages/clang/duchain/builder.cpp, line 977
> > <https://git.reviewboard.kde.org/r/127061/diff/1/?file=444167#file444167line977>
> >
> >     I'd pull this out into its own line(s) for readability
> >     
> >         auto offsetString = QString::number(offset / 8);
> >         if (auto rest = offset % 8) {
> >             offsetString += QLatin1Char(':') + QString::number(rest);
> >         }
> >     
> >     and then just replace offset with offsetString in the old i18n call.

Looks better, indeed.


- Alexandre


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127061/#review92338
-----------------------------------------------------------


On Feb. 13, 2016, 6:25 a.m., Alexandre Courbot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127061/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2016, 6:25 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Having the offsets of members in a structure displayed is extremely
> useful for people who work with data structures. However the unit
> chosen (bits) is not really common. This patch changes it to bytes. If
> an offset doesn't round to a byte position, the extra bits are also
> displayed.
> 
> 
> Diffs
> -----
> 
>   languages/clang/duchain/builder.cpp 22d00f0fbbbcbce2eab92df2d9ed2b33e237a9e2 
> 
> Diff: https://git.reviewboard.kde.org/r/127061/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexandre Courbot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160215/c4aac8f7/attachment-0001.html>


More information about the KDevelop-devel mailing list