[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Concerning automated astyle application to the code
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2010-01-17 19:53:44
Message-ID: ae32c1ef1001171153m3cb484b2wb95e45529d7ba3c9 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi, All!
I know it is good to keep the code in a good consistent style. But here is a
piece of code, changed by automated astyle commit:
KisPaintDeviceSP KisGroupLayer::tryObligeChild() const
{
KisPaintDeviceSP retval;
if (parent().isNull() && childCount() == 1) {
const KisLayer *child =
dynamic_cast<KisLayer*>(firstChild().data());
if (child &&
child->channelFlags().isEmpty() &&
child->projection() &&
child->visible() &&
child->opacity() == OPACITY_OPAQUE &&
*child->projection()->colorSpace() == *colorSpace()) {
retval = child->projection();
}
}
return retval;
}
In original it looked quite pretty:
KisPaintDeviceSP KisGroupLayer::tryObligeChild() const
{
KisPaintDeviceSP retval;
if (parent().isNull() && childCount() == 1) {
const KisLayer *child =
dynamic_cast<KisLayer*>(firstChild().data());
if (child &&
child->channelFlags().isEmpty() &&
child->projection() &&
child->visible() &&
child->opacity() == OPACITY_OPAQUE &&
*child->projection()->colorSpace() == *colorSpace()) {
retval = child->projection();
}
}
return retval;
}
So should we report to astyle developers or change some options?
--
Dmitry Kazakov
[Attachment #5 (text/html)]
Hi, All!<div><br></div><div>I know it is good to keep the code in a good consistent \
style. But here is a piece of code, changed by automated astyle \
commit:</div><div><br></div><div><br></div><div><div><font class="Apple-style-span" \
face="'courier new', monospace">KisPaintDeviceSP \
KisGroupLayer::tryObligeChild() const</font></div> <div><font \
class="Apple-style-span" face="'courier new', \
monospace">{</font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> KisPaintDeviceSP retval;</font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"><br> \
</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"> if (parent().isNull() && childCount() == 1) \
{</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"> const KisLayer *child = \
dynamic_cast<KisLayer*>(firstChild().data());</font></div> <div><font \
class="Apple-style-span" face="'courier new', \
monospace"><br></font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> if (child &&</font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"> \
child->channelFlags().isEmpty() &&</font></div> <div><font \
class="Apple-style-span" face="'courier new', monospace"> \
child->projection() &&</font></div><div><font class="Apple-style-span" \
face="'courier new', monospace"> child->visible() \
&&</font></div> <div><font class="Apple-style-span" face="'courier \
new', monospace"> child->opacity() == OPACITY_OPAQUE \
&&</font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> \
*child->projection()->colorSpace() == *colorSpace()) {</font></div> <div><font \
class="Apple-style-span" face="'courier new', \
monospace"><br></font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> retval = child->projection();</font></div> \
<div><font class="Apple-style-span" face="'courier new', monospace"> \
}</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"> }</font></div><div><font class="Apple-style-span" \
face="'courier new', monospace"><br> </font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"> return \
retval;</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace">}</font></div><div><br></div> <div><font class="Apple-style-span" \
face="arial, helvetica, sans-serif">In original it looked quite \
pretty:</font></div><div><br></div></div><div><div><font class="Apple-style-span" \
face="'courier new', monospace">KisPaintDeviceSP \
KisGroupLayer::tryObligeChild() const</font></div> <div><font \
class="Apple-style-span" face="'courier new', \
monospace">{</font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> KisPaintDeviceSP retval;</font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"><br> \
</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"> if (parent().isNull() && childCount() == 1) \
{</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"> const KisLayer *child = \
dynamic_cast<KisLayer*>(firstChild().data());</font></div> <div><font \
class="Apple-style-span" face="'courier new', \
monospace"><br></font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> if (child &&</font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"> \
child->channelFlags().isEmpty() &&</font></div> <div><font \
class="Apple-style-span" face="'courier new', monospace"> \
child->projection() &&</font></div><div><font class="Apple-style-span" \
face="'courier new', monospace"> child->visible() \
&&</font></div> <div><font class="Apple-style-span" face="'courier \
new', monospace"> child->opacity() == OPACITY_OPAQUE \
&&</font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> *child->projection()->colorSpace() == \
*colorSpace()) {</font></div> <div><font class="Apple-style-span" face="'courier \
new', monospace"><br></font></div><div><font class="Apple-style-span" \
face="'courier new', monospace"> retval = \
child->projection();</font></div> <div><font class="Apple-style-span" \
face="'courier new', monospace"> }</font></div><div><font \
class="Apple-style-span" face="'courier new', monospace"> \
}</font></div><div><font class="Apple-style-span" face="'courier new', \
monospace"><br> </font></div><div><font class="Apple-style-span" face="'courier \
new', monospace"> return retval;</font></div><div><font \
class="Apple-style-span" face="'courier new', \
monospace">}</font></div><div><br></div> <div><font class="Apple-style-span" \
face="arial, helvetica, sans-serif">So should we report to astyle developers or \
change some options?</font></div><br>-- <br>Dmitry Kazakov<br> </div>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic