diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aff844fff1675ecf91463a642ed617e32dbc68f..edb6c4f9740ebf5f5958aaf16fd6b525f8bfea6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,13 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") -fopenmp ) elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") - target_compile_options(Vivy PRIVATE -fopenmp) + target_compile_options(Vivy PRIVATE + -fopenmp + -Wno-subobject-linkage # Kubat: Some proglems here, it seems they + # occure because of the usage of "using" for + # type aliasing... As I won't get ride of the + # "using"s the warning is disabled + ) endif() set_target_properties(Vivy PROPERTIES diff --git a/src/Lib/AbstractMediaContext.hh b/src/Lib/AbstractMediaContext.hh index 1e113c455eae064d9c2304f01e03341800a04563..f4a09ed6c040a96dcbea04d0b71fe2491430f727 100644 --- a/src/Lib/AbstractMediaContext.hh +++ b/src/Lib/AbstractMediaContext.hh @@ -42,7 +42,6 @@ static inline constexpr auto avFormatContextDeleter = [](AVFormatContext *ptr) n using AVFormatContextPtr = std::unique_ptr<AVFormatContext, decltype(avFormatContextDeleter)>; using AVCodecContextPtr = std::unique_ptr<AVCodecContext, decltype(codecContexteleter)>; -using DataPtr = std::shared_ptr<double[]>; using AVFramePtr = std::unique_ptr<AVFrame, decltype(avFrameDeleter)>; using SwrContextPtr = std::unique_ptr<SwrContext, decltype(swrContenxtDeleter)>; diff --git a/src/Lib/Ass/Style.cc b/src/Lib/Ass/Style.cc index 73afcbb1e27b470e2ecbaf8028b2319d8e064a16..1a6ce05cc1658ca8169c81a338917cb37f535ba8 100644 --- a/src/Lib/Ass/Style.cc +++ b/src/Lib/Ass/Style.cc @@ -176,13 +176,13 @@ Style::getProperties() const noexcept }; QJsonObject styleFontProperties{ - { "Scale X", static_cast<const double>(scaleX) }, - { "Scale Y", static_cast<const double>(scaleY) }, - { "Spacing", static_cast<const double>(spacing) }, - { "Angle", static_cast<const double>(angle) }, - { "Border Style", static_cast<const double>(borderStyle) }, - { "Outline", static_cast<const double>(outline) }, - { "Shadow", static_cast<const double>(shadow) }, + { "Scale X", static_cast<double>(scaleX) }, + { "Scale Y", static_cast<double>(scaleY) }, + { "Spacing", static_cast<double>(spacing) }, + { "Angle", static_cast<double>(angle) }, + { "Border Style", static_cast<double>(borderStyle) }, + { "Outline", static_cast<double>(outline) }, + { "Shadow", static_cast<double>(shadow) }, }; QJsonObject styleMargins{ diff --git a/src/Lib/Audio.hh b/src/Lib/Audio.hh index 36cc5519ea42b5b3c73c3f655e2ed082bed4d7da..920b1033228943d2ffc2a63c435682e06a7883fe 100644 --- a/src/Lib/Audio.hh +++ b/src/Lib/Audio.hh @@ -65,10 +65,5 @@ public: QString getElementName() const noexcept override; QJsonDocument getProperties() const noexcept override; - -private: - // Regarding the format - using AVFormatContextPtr = std::unique_ptr<AVFormatContext, decltype(avFormatContextDeleter)>; - AVFormatContextPtr format{ avformat_alloc_context(), avFormatContextDeleter }; }; } diff --git a/src/Lib/Document/VivyDocument.cc b/src/Lib/Document/VivyDocument.cc index 5a6dacc576c2330cab3b35b7f9c90b711f941ab0..01f15771799f2a80fb5c6e45a705d9688ab92855 100644 --- a/src/Lib/Document/VivyDocument.cc +++ b/src/Lib/Document/VivyDocument.cc @@ -339,7 +339,7 @@ VivyDocument::setAudioSubDocument(const QString filename) noexcept QFileInfo fileInfo(filename); const QString baseName = fileInfo.baseName(); - if (auto doc = audioDocument.get()) { + if ([[maybe_unused]] auto doc = audioDocument.get()) { // Here we may want to do some confirmation / cleanup audioDocument.reset(); } @@ -356,7 +356,7 @@ VivyDocument::setVideoSubDocument(const QString filename) noexcept QFileInfo fileInfo(filename); const QString baseName = fileInfo.baseName(); - if (auto doc = videoDocument.get()) { + if ([[maybe_unused]] auto doc = videoDocument.get()) { // Here we may want to do some confirmation / cleanup videoDocument.reset(); } @@ -373,7 +373,7 @@ VivyDocument::setAssSubDocument(const QString filename) noexcept QFileInfo fileInfo(filename); const QString baseName = fileInfo.baseName(); - if (auto doc = assDocument.get()) { + if ([[maybe_unused]] auto doc = assDocument.get()) { // Here we may want to do some confirmation / cleanup assDocument.reset(); } diff --git a/src/Lib/Script/CRTPLuaScriptObject.hh b/src/Lib/Script/CRTPLuaScriptObject.hh index eed3eb57baa96e15460b99e62475e96995d02cd5..3a5a51e7477de51cd507d6afe569d9f0e9f172b9 100644 --- a/src/Lib/Script/CRTPLuaScriptObject.hh +++ b/src/Lib/Script/CRTPLuaScriptObject.hh @@ -70,11 +70,7 @@ protected: { luaL_checktype(L, tblIndex, LUA_TTABLE); const std::size_t count = lua_rawlen(L, tblIndex); - if (count >= std::numeric_limits<int>::max()) - luaL_error(L, "To many items (%lu) in table to iterate over!", count); - - const int countInt = static_cast<const int>(count); - for (int i = 1; i <= countInt; ++i) { + for (int i = 1; std::cmp_less(i, count); ++i) { luaL_checktype(L, tblIndex, LUA_TTABLE); lua_pushinteger(L, i); // i -> top stack lua_gettable(L, tblIndex); // T[i] -> top stack and pop i diff --git a/src/UI/MainWindow.cc b/src/UI/MainWindow.cc index f4f1d71f9f9191f72185b1c243d31d7f05ea97f0..01ebb7bcea828edeb701ef4a269394d0d66a4e1c 100644 --- a/src/UI/MainWindow.cc +++ b/src/UI/MainWindow.cc @@ -175,7 +175,7 @@ MainWindow::updateFakeVimUsage(bool yes) noexcept documentExists && (docView->getDocument()->getType() == AbstractDocument::Type::Script); if (isScriptEditor) - static_cast<ScriptDocumentView *const>(docView)->setUseFakeVimEditor(yes); + static_cast<ScriptDocumentView *>(docView)->setUseFakeVimEditor(yes); } } diff --git a/src/UI/ScriptViews/ScriptHighlighter.cc b/src/UI/ScriptViews/ScriptHighlighter.cc index 564ea25aeff23b5ced99fe4603faabeac3c423ec..2baf555a1ac8e625e4f3e6b4c87546ef4b9b6265 100644 --- a/src/UI/ScriptViews/ScriptHighlighter.cc +++ b/src/UI/ScriptViews/ScriptHighlighter.cc @@ -100,7 +100,7 @@ ScriptHighlighter::previousBlockState() noexcept state != Utils::toUnderlying(BlockState::Comment)) return BlockState::None; - return static_cast<const BlockState>(state); + return static_cast<BlockState>(state); } void