Removed old style casts, casts in some cases and some lines that would never be executed.
Details
Diff Detail
- Repository
- R326 Kalzium
- Branch
- removed_old_style
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 3119 Build 3137: arc lint + arc unit
This patch does more things that "remove old style casts". Some of the other changes are OK, but please do split them in own changes, properly documenting them.
src/exportdialog.cpp | ||
---|---|---|
183 | you use dynamic_cast when you expect that the cast can fail; since in this case it is assumed it will work, then use static_cast directly instead | |
187 | ditto also, property is casted more than once within this foreach loop, so factorize it | |
190–191 | ditto | |
203 | ditto | |
207 | ditto (dynamic_cast + factorize) | |
210–211 | ditto | |
224 | ditto | |
230 | ditto (dynamic_cast + factorize) | |
235–236 | ditto | |
src/kdeeduglossary.cpp | ||
236–237 | or, simpler, turn both num and i to int, since the only usage of i is with QDomNodeList::item(int) | |
241 | QDomNode::toElement() already returns a QDomElement, so this cast can go away altogether | |
247 | ditto | |
src/molcalcwidget.cpp | ||
101 | i is already int, so this cast can go altogether | |
137 | ditto | |
src/spectrumviewimpl.cpp | ||
75 | as mentioned this goes to another patch... hoever you do not need to cast nullptr to anything... |
- Removed unnecessary casts
- Altered dynamic to static cast
- Changed variables from uint to int type
- Removed casts
- again, please do not mix unrelated changes, just submit separate and documented review for them
- please follow a bit more the existing coding style
libscience/isotope.cpp | ||
---|---|---|
97 | unrelated change | |
src/calculator/calculator.cpp | ||
89 | unrelated change | |
src/calculator/concCalculator.cpp | ||
291 | unrelated change | |
299 | unrelated change | |
331 | unrelated change | |
341 | unrelated change | |
371–373 | unrelated changes | |
626 | good, but unrelated change | |
src/calculator/gasCalculator.cpp | ||
337–338 | unrelated change | |
src/exportdialog.cpp | ||
182 | coding style, extra space between angle bracket and round bracket | |
186 | coding style, extra space between angle bracket and round bracket | |
190–191 | coding style, i.e missing space after comma | |
202 | coding style, extra space between angle bracket and round bracket | |
206 | coding style, extra space between angle bracket and round bracket | |
210–211 | coding style, i.e missing space after comma | |
223 | coding style, extra space between angle bracket and round bracket | |
229 | coding style, extra space between angle bracket and round bracket | |
233 | coding style, extra space between angle bracket and round bracket | |
235–236 | coding style, i.e missing space after comma | |
src/isotopetable/isotopeguideview.cpp | ||
27 | unrelated change | |
src/spectrumviewimpl.cpp | ||
75 | unrelated change | |
src/spectrumwidget.cpp | ||
155 | coding style, extra space between angle bracket and round bracket | |
206 | coding style, extra space between angle bracket and round bracket | |
219 | coding style, extra space between angle bracket and round bracket | |
230 | coding style, extra space between angle bracket and round bracket | |
318 | coding style, extra space between angle bracket and round bracket | |
324 | unrelated change | |
361–363 | coding style, extra space between angle bracket and round bracket | |
src/tablesdialog.cpp | ||
270 | coding style, extra space between angle bracket and round bracket | |
src/tools/moleculeview.cpp | ||
174 | unrelated change | |
src/tools/obconverter.cpp | ||
64 | unrelated change |
Hi,
I'm a student at UFF (Universidade Federal Fluminense), Brazil and i'm starting to learn how the commit system works, sorry for the multiple troubles while doing it. I spoke with Tomaz and i'm going to close the review and open a new one with smaller alterations, so i can better modularize the changes. Thanks for the help and i would like to ask if i could place you as reviewer in my next one, if possible.
Thanks again for the help,
Carlos Henrique
Hi Carlos,
there is no need to drop this change -- just make it contain only the changes related to the casts.
Hi,
I'm in the middle of my exams and things are a little complicated,. I'll reactivate and fix this review next Friday (or as soon as i'm able).