Skip to content
Extraits de code Groupes Projets
Valider e52d857a rédigé par Elliu's avatar Elliu
Parcourir les fichiers

Fix various Clang warnings

parent 509274da
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #3884 réussi
......@@ -26,6 +26,7 @@ set(STL_INC
<iomanip>
<filesystem>
<bit>
<cfloat>
)
set(EXT_INC PRIVATE
......
......@@ -26,9 +26,6 @@ public:
explicit Syl(Line *const, const QString &,
ConstructMode mode = ConstructMode::ReadAssTags) noexcept;
Syl &operator=(const Syl &) = delete;
~Syl() noexcept = default;
QString getContent() const noexcept;
quint64 getDuration() const noexcept;
......
......@@ -40,8 +40,8 @@ JobDeclaration::setOptions(lua_State *L) noexcept
IterateOverArray(L, 2, [&context, job, L]() noexcept -> bool {
OptionDeclaration *opt = OptionDeclaration::CHECK(L, -1);
for (const auto &[name, value] : opt->options) {
err(context) << "\tregister option \"" << name << "\" with type \""
for (const auto &[regName, value] : opt->options) {
err(context) << "\tregister option \"" << regName << "\" with type \""
<< value.getSignature() << "\"";
}
......
......@@ -27,6 +27,7 @@
#include <iomanip>
#include <filesystem>
#include <bit>
#include <cfloat>
/* EXT_INC_PRIVATE */
#include <mpv/client.h>
......
......@@ -44,7 +44,7 @@ private:
void mouseMoveEvent(QMouseEvent *) noexcept override;
protected slots:
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override;
signals:
void hoverIndexChanged(QModelIndex);
......
......@@ -72,7 +72,7 @@ TimingAxis::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWi
if (minorTicks > 0) {
for (int i = 0; i < audioLength; i += minorTicks) {
int pos = getTimingParam()->posFromMs(i);
if (Q_LIKELY(fmod(i, majorTicks) != 0))
if (Q_LIKELY(fmod(i, majorTicks) < DBL_EPSILON))
painter->drawLine(pos, 0, pos, -minorTicksHeight);
}
}
......
......@@ -12,7 +12,6 @@ public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
int height;
QString cursorTime;
// FIXME
// Forced to define a "max-width" for the text,
......
......@@ -41,7 +41,7 @@ TimingLine::sepEnterPress(int sepIndex)
void
TimingLine::sepExitPress(int sepIndex)
{
if (tempOffset) {
if (qAbs(tempOffset) <= DBL_EPSILON) {
prepareGeometryChange();
if (sepIndex == 0) {
moveBy(tempOffset, 0);
......
......@@ -58,31 +58,31 @@ public:
{
m_minorTicks = t;
m_majorTicks = T;
};
inline void setAxisHeight(int x) { m_axisHeight = x; };
inline void setAudioHeight(int x) { m_audioHeight = x; };
}
inline void setAxisHeight(int x) { m_axisHeight = x; }
inline void setAudioHeight(int x) { m_audioHeight = x; }
inline void setAudioWidth(int x)
{
m_audioWidth = int(x * m_audioWidthScale);
updateRatios();
};
}
inline void setAudioLength(int x)
{
m_audioLength = x;
updateRatios();
};
}
inline int axisHeight() { return m_axisHeight; };
inline int audioHeight() { return m_audioHeight; };
inline int audioWidth() { return m_audioWidth; };
inline int audioLength() { return m_audioLength; };
inline int axisHeight() { return m_axisHeight; }
inline int audioHeight() { return m_audioHeight; }
inline int audioWidth() { return m_audioWidth; }
inline int audioLength() { return m_audioLength; }
inline void setAudioWidthScale(int s)
{
m_audioWidthScale = 1 + 0.01 * s;
setAudioWidth(m_audioWidth);
updateRatios();
};
}
template <typename T> T posFromMs(T t) noexcept {
return T(t * m_wl);
......
......@@ -33,8 +33,8 @@ signals:
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value) noexcept override;
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
public:
void silentlySetPos(qreal, qreal);
......
......@@ -35,7 +35,7 @@ public:
QIcon getDocumentTabIcon() const noexcept override;
AbstractDocument *getDocument() const noexcept override;
void loadViews() noexcept override{};
void loadViews() noexcept override {}
void setUseFakeVimEditor(bool yes) noexcept;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter