Warning Roundup
ClosedPublic

Authored by rizzitello on Sep 30 2018, 3:05 PM.

Diff Detail

Repository
R231 Atelier
Branch
smallthings
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3843
Build 3861: arc lint + arc unit
rizzitello requested review of this revision.Sep 30 2018, 3:05 PM
rizzitello created this revision.
rizzitello retitled this revision from Remove unused capture for lambda to Warning Roundup.Sep 30 2018, 3:10 PM
rizzitello edited the summary of this revision. (Show Details)
rizzitello added a project: Atelier: AtCore.
rizzitello added a subscriber: Atelier: AtCore.
rizzitello updated this revision to Diff 42650.Oct 1 2018, 10:08 AM
rizzitello edited the summary of this revision. (Show Details)
  • add isEqual method to make code more readable
rizzitello updated this revision to Diff 42693.Oct 1 2018, 8:31 PM
  • use std::max
rizzitello updated this revision to Diff 42770.Oct 3 2018, 1:04 AM
  • check for 0 before adding
  • Clean warnings

why you are sending a float and casting it to double instead of passing everything as double?

Sith, there's two reviews with similar code, can you remove the duplications?
I don't understand why the amount of casting is needed.

src/dialogs/profilesdialog.cpp
57–58

QStringLiteral

Sith, there's two reviews with similar code, can you remove the duplications?
I don't understand why the amount of casting is needed.

The Casts are to remove compile time warnings of "Implicit casts" I have added the explicit casts to remove the warnings.

rizzitello updated this revision to Diff 43019.Oct 7 2018, 11:10 AM
  • Add QStringLiteral
rizzitello marked an inline comment as done.Oct 7 2018, 11:10 AM
tcanabrava added inline comments.Oct 7 2018, 11:19 AM
src/widgets/thermowidget.cpp
290–298

this can be a function outside of the thermo widget if we need to use it anywhere else.
just a normal function, not a class method.

rizzitello marked an inline comment as done.Oct 7 2018, 11:22 AM
rizzitello added inline comments.
src/widgets/thermowidget.cpp
290–298

It could but its only needed here because the Qwt widget used here forces us to compare a bunch of doubles. This is not done elsewhere in the project.

rizzitello marked an inline comment as done.Oct 7 2018, 11:31 AM
tcanabrava accepted this revision.Oct 9 2018, 8:04 AM
This revision is now accepted and ready to land.Oct 9 2018, 8:04 AM
patrickelectric requested changes to this revision.Oct 10 2018, 12:00 PM
patrickelectric added inline comments.
src/widgets/3dview/fileloader.cpp
65

you can change perc itself to int, no ?

src/widgets/bedextruderwidget.cpp
50

Can we just change the thermo widget to emit ints ?

src/widgets/thermowidget.cpp
293

If a is -1 and b zero, this will fail.

This revision now requires changes to proceed.Oct 10 2018, 12:00 PM
rizzitello updated this revision to Diff 43352.Oct 10 2018, 8:50 PM
rizzitello marked 3 inline comments as done.
  • Patrick's suggestions
rizzitello updated this revision to Diff 43358.Oct 10 2018, 9:07 PM
  • Target temperature can only be an int.
laysrodrigues accepted this revision.Oct 13 2018, 2:08 PM
patrickelectric requested changes to this revision.Oct 13 2018, 6:23 PM
patrickelectric added inline comments.
src/widgets/thermowidget.cpp
261

Why you are not using int directly in xpos and ypos ?

This revision now requires changes to proceed.Oct 13 2018, 6:23 PM
rizzitello updated this revision to Diff 43552.Oct 13 2018, 7:17 PM
  • Use int to avoid casts
patrickelectric accepted this revision.Oct 13 2018, 7:23 PM
This revision is now accepted and ready to land.Oct 13 2018, 7:23 PM
rizzitello closed this revision.Oct 13 2018, 7:32 PM