From 8c0f817a6858b2129a2cc8f155363f55e2a78580 Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Sun, 27 Jun 2021 16:26:27 +0200 Subject: [PATCH] MISC: Fix some warnings --- .gitignore | 2 ++ src/Ass/Line.cc | 4 ++-- src/MainWindow.cc | 2 +- src/TimingScene.cc | 2 +- src/Utils.hh | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bcc2a83a..b4e77fa3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ Debug/* # Build folder build/* +build.gcc/* +build.clang/* # Local configurations .vim/* diff --git a/src/Ass/Line.cc b/src/Ass/Line.cc index c4135c3e..7a1fdfcd 100644 --- a/src/Ass/Line.cc +++ b/src/Ass/Line.cc @@ -10,7 +10,7 @@ Line::setStart(quint64 s) noexcept start = s; if (s > end) end = s; -}; +} void Line::setEnd(quint64 s) noexcept @@ -18,4 +18,4 @@ Line::setEnd(quint64 s) noexcept end = s; if (start > s) start = s; -}; +} diff --git a/src/MainWindow.cc b/src/MainWindow.cc index 361299f3..85c062f6 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -128,7 +128,7 @@ MainWindow::openDocument() noexcept documents->addTab(documentView, document.lock()->getName()); } catch (const std::runtime_error &e) { qCritical() << "Failed to create the document view for" << baseName << "with path" << filename; - throw; + throw std::runtime_error("failed to create a document view"); } } diff --git a/src/TimingScene.cc b/src/TimingScene.cc index 78401ba8..f540fd86 100644 --- a/src/TimingScene.cc +++ b/src/TimingScene.cc @@ -77,4 +77,4 @@ QGraphicsPixmapItem * TimingScene::bg() noexcept { return backgroundImg; -}; +} diff --git a/src/Utils.hh b/src/Utils.hh index e50543b3..5a8d9480 100644 --- a/src/Utils.hh +++ b/src/Utils.hh @@ -35,6 +35,6 @@ enum DocumentType : unsigned long long { }; bool detectDocumentType(const QFileInfo &, DocumentType *); -}; +} #endif // VIVY_UTILS_H -- GitLab