Browse Source

refactor: Comply with Clang's Wdouble-promotion

reviewable/pr6571/r4
Anthony Bilinski 4 years ago
parent
commit
6e7ca76911
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/chatlog/chatwidget.h
  2. 2
      src/chatlog/content/text.cpp
  3. 6
      src/core/toxfileprogress.cpp
  4. 2
      src/widget/tool/flyoutoverlaywidget.h
  5. 4
      src/widget/tool/toolboxgraphicsitem.h

2
src/chatlog/chatwidget.h

@ -206,7 +206,7 @@ private: @@ -206,7 +206,7 @@ private:
// layout
QMargins margins = QMargins(10, 10, 10, 10);
qreal lineSpacing = 5.0f;
qreal lineSpacing = 5.0;
IChatLog& chatLog;
bool colorizeNames = false;

2
src/chatlog/content/text.cpp

@ -96,7 +96,7 @@ void Text::deselectText() @@ -96,7 +96,7 @@ void Text::deselectText()
void Text::setWidth(float w)
{
width = w;
width = static_cast<qreal>(w);
dirty = true;
regenerate();

6
src/core/toxfileprogress.cpp

@ -100,7 +100,7 @@ double ToxFileProgress::getSpeed() const @@ -100,7 +100,7 @@ double ToxFileProgress::getSpeed() const
{
if (samples.size() > 0
&& samples[activeSample].bytesSent == filesize) {
return 0.0f;
return 0.0;
}
const auto sampleTimeInvalid = [](const Sample& sample) {
@ -108,11 +108,11 @@ double ToxFileProgress::getSpeed() const @@ -108,11 +108,11 @@ double ToxFileProgress::getSpeed() const
};
if (std::any_of(samples.cbegin(), samples.cend(), sampleTimeInvalid)) {
return 0.0f;
return 0.0;
}
if (samples[0].timestamp == samples[1].timestamp) {
return 0.0f;
return 0.0;
}
const auto& active = samples[activeSample];

2
src/widget/tool/flyoutoverlaywidget.h

@ -55,6 +55,6 @@ private: @@ -55,6 +55,6 @@ private:
QWidget* container;
QPropertyAnimation* animation;
qreal percent = 1.0f;
qreal percent = 1.0;
QPoint startPos;
};

4
src/widget/tool/toolboxgraphicsitem.h

@ -42,7 +42,7 @@ private: @@ -42,7 +42,7 @@ private:
void startAnimation(QAbstractAnimation::Direction direction);
QPropertyAnimation* opacityAnimation;
qreal idleOpacity = 0.0f;
qreal activeOpacity = 1.0f;
qreal idleOpacity = 0.0;
qreal activeOpacity = 1.0;
int fadeTimeMs = 300;
};

Loading…
Cancel
Save