From cea08b7a890a6c6c76b90cecbff6863681e2a3fd Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Wed, 23 Mar 2022 12:12:16 +0100 Subject: [PATCH 01/22] changeless From 6ffba7ff388011dcf4bfd1fb19ec28dbb7ec24cb Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 10:43:18 +0100 Subject: [PATCH 02/22] Try C++20 --- .github/workflows/ci_build.yml | 2 +- cmake/CMakeLists.txt | 4 ++-- setup.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 08437b037dc..5dd93eaacb2 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -6,7 +6,7 @@ on: # but only for the branches specified branches: # Push events on develop branch - - develop + - develop-c++20 # Push events on ci-test branch (uncomment if needed for testing purposes) # - ci-test paths-ignore: diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5cddd3ed514..0c865ce37df 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -48,7 +48,7 @@ if(MSVC) add_definitions(/wd4244) # suppress warning of possible loss of precision add_definitions(-DNO_PAE_SUPPORT) # regex is working differently under Windows so PAE is not supported (yet) add_definitions(-DUSE_PAE_OLD_PARSER) - add_definitions(/std:c++17) + add_definitions(/std:c++20) include_directories(../include/win32) else() if(CMAKE_BUILD_TYPE MATCHES Debug) @@ -60,7 +60,7 @@ else() # jsonxx raises -Wdollar-in-identifier-extension # gcc 8.3.1 does not like -Wdollar-in-identifier-extension option. add_definitions(-Wall -W -pedantic -Wno-unused-parameter -Wno-dollar-in-identifier-extension) - add_definitions(-std=c++17) + add_definitions(-std=c++20) # extra warnings similar to Xcode compiling settings (most probably covered by -Wall): # https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/DiagnosticGroups.td diff --git a/setup.py b/setup.py index fc1f38b2709..a310909ee60 100644 --- a/setup.py +++ b/setup.py @@ -83,10 +83,10 @@ def get_version() -> str: # extra compile arguments EXTRA_COMPILE_ARGS = ['-DPYTHON_BINDING'] if platform.system() != 'Windows': - EXTRA_COMPILE_ARGS += ['-std=c++17', + EXTRA_COMPILE_ARGS += ['-std=c++20', '-Wno-write-strings', '-Wno-overloaded-virtual', '-g0'] else: - EXTRA_COMPILE_ARGS += ['/std:c++17', + EXTRA_COMPILE_ARGS += ['/std:c++20', '-DNO_PAE_SUPPORT'] verovio_module = Extension('verovio._verovio', From 6971b2ee96110f915cef35d92100c44b9ce5ee44 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 10:44:21 +0100 Subject: [PATCH 03/22] add quotes --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 5dd93eaacb2..6fae0ad4aa0 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -6,7 +6,7 @@ on: # but only for the branches specified branches: # Push events on develop branch - - develop-c++20 + - "develop-c++20" # Push events on ci-test branch (uncomment if needed for testing purposes) # - ci-test paths-ignore: From c6cd6143d8b68cd330d20659ae0f819d63aea045 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 10:48:05 +0100 Subject: [PATCH 04/22] rename branch --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 6fae0ad4aa0..f48281b5631 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -6,7 +6,7 @@ on: # but only for the branches specified branches: # Push events on develop branch - - "develop-c++20" + - 'develop-c20' # Push events on ci-test branch (uncomment if needed for testing purposes) # - ci-test paths-ignore: From 3921011a1f07bd917d10bf18c4a5bd6fd6a71e39 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 11:02:15 +0100 Subject: [PATCH 05/22] Reset cache --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index f48281b5631..c03acec7977 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -44,7 +44,7 @@ env: # emscripten EM_VERSION: latest EM_CACHE_FOLDER: "emsdk-cache" - EM_CACHE_ID: 2 + EM_CACHE_ID: 3 # gh-pages GH_PAGES_REPO: ${{ github.repository_owner }}/verovio.org # works from rism-digital and from forks From 199368a88683730aa78878d5f545753956e31c3c Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 11:10:45 +0100 Subject: [PATCH 06/22] Change C++ version in emscripten --- emscripten/buildToolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emscripten/buildToolkit b/emscripten/buildToolkit index b6f20e5a7ae..afde9dd2b76 100755 --- a/emscripten/buildToolkit +++ b/emscripten/buildToolkit @@ -55,7 +55,7 @@ my ($lightQ, $version, $chattyQ, $helpQ, $exclusion, $wasmQ, $makeQ, $modularize my ($nopae, $nohumdrum, $nomusicxml, $nodarms); my ($FLAGS_NAME, $VERSION, $CHATTY); -my $cpp = 17; # c++ version to compile (11, 14, 17) +my $cpp = 20; # c++ version to compile (11, 14, 17) my $VEROVIO_ROOT = ".."; Getopt::Long::Configure("bundling"); From 29fbb92e28635d5f5a6dde7484a303b68705a15d Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 11:21:00 +0100 Subject: [PATCH 07/22] Move LedgerLine up for some compilers --- include/vrv/staff.h | 86 ++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/include/vrv/staff.h b/include/vrv/staff.h index 51cbdbd9346..cd68fe3eaa4 100644 --- a/include/vrv/staff.h +++ b/include/vrv/staff.h @@ -23,6 +23,49 @@ class Syl; class TimeSpanningInterface; class Tuning; +//---------------------------------------------------------------------------- +// LedgerLine +//---------------------------------------------------------------------------- + +/** + * This is a class with no MEI equivalent for representing legder lines. + * A ledger line is represented by a list of dashes. + * Each dash is represented by a pair of points (left - right). + */ +class LedgerLine { +public: + /** + * @name Constructors, destructors, reset methods + * Reset method reset all attribute classes + */ + ///@{ + LedgerLine(); + virtual ~LedgerLine(); + virtual void Reset(); + ///@} + + /** + * Add a dash to the ledger line object. + * If necessary merges overlapping dashes. + */ + void AddDash(int left, int right, int extension); + +protected: + // +private: + // +public: + /** + * A list of dashes relative to the staff position. + */ + std::list> m_dashes; + +protected: + // +private: + // +}; + //---------------------------------------------------------------------------- // Staff //---------------------------------------------------------------------------- @@ -249,49 +292,6 @@ class Staff : public Object, ///@} }; -//---------------------------------------------------------------------------- -// LedgerLine -//---------------------------------------------------------------------------- - -/** - * This is a class with no MEI equivalent for representing legder lines. - * A ledger line is represented by a list of dashes. - * Each dash is represented by a pair of points (left - right). - */ -class LedgerLine { -public: - /** - * @name Constructors, destructors, reset methods - * Reset method reset all attribute classes - */ - ///@{ - LedgerLine(); - virtual ~LedgerLine(); - virtual void Reset(); - ///@} - - /** - * Add a dash to the ledger line object. - * If necessary merges overlapping dashes. - */ - void AddDash(int left, int right, int extension); - -protected: - // -private: - // -public: - /** - * A list of dashes relative to the staff position. - */ - std::list> m_dashes; - -protected: - // -private: - // -}; - } // namespace vrv #endif From c858185fddd292d6985540c69ec5111d65b22585 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 11:24:00 +0100 Subject: [PATCH 08/22] Remove clang 6.0 and add 10 --- .github/workflows/ci_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index c03acec7977..b763aec2ebb 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -88,11 +88,11 @@ jobs: - os: ubuntu-20.04 compiler: clang - version: "6.0" + version: "9" - os: ubuntu-20.04 compiler: clang - version: "9" + version: "10" - os: ubuntu-20.04 compiler: clang From 4e37f51e98c54f8b32d31835e7007f5117ed07a1 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 12:12:22 +0100 Subject: [PATCH 09/22] Change g++ and clang CI to 10 to 12 versions --- .github/workflows/ci_build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index b763aec2ebb..5b91884c2b1 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -76,23 +76,23 @@ jobs: include: - os: ubuntu-20.04 compiler: g++ - version: "9" + version: "10" - os: ubuntu-20.04 compiler: g++ - version: "10" + version: "11" - os: ubuntu-20.04 compiler: g++ - version: "11" + version: "12" - os: ubuntu-20.04 compiler: clang - version: "9" + version: "10" - os: ubuntu-20.04 compiler: clang - version: "10" + version: "11" - os: ubuntu-20.04 compiler: clang From c03b92def94ff042ceb3c43a73cbdca03118aed5 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 12:12:44 +0100 Subject: [PATCH 10/22] Change xcode to c++20 --- Verovio.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Verovio.xcodeproj/project.pbxproj b/Verovio.xcodeproj/project.pbxproj index 6a55d542017..111c13c9f03 100644 --- a/Verovio.xcodeproj/project.pbxproj +++ b/Verovio.xcodeproj/project.pbxproj @@ -5024,7 +5024,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; @@ -5083,7 +5083,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; From 9b80afefca01402c9cd5636a86947fae903003e8 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 19 Jan 2024 12:16:10 +0100 Subject: [PATCH 11/22] Try g++12 on ubuntu 22.04 --- .github/workflows/ci_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 5b91884c2b1..af74d63ba6a 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -82,7 +82,7 @@ jobs: compiler: g++ version: "11" - - os: ubuntu-20.04 + - os: ubuntu-22.04 compiler: g++ version: "12" From 5df899b47d270d9dffc1cfa2ce02606419063b1c Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Tue, 23 Jan 2024 09:24:50 +0100 Subject: [PATCH 12/22] Use C++20 contains() --- src/accid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accid.cpp b/src/accid.cpp index 4f3ba9b2dea..73a12003ff8 100644 --- a/src/accid.cpp +++ b/src/accid.cpp @@ -162,7 +162,7 @@ void Accid::AdjustX(LayerElement *element, const Doc *doc, int staffSize, std::v leftAccids.push_back(accid); return; } - if (adjustedAccids.count(accid) == 0) return; + if (!adjustedAccids.contains(accid)) return; } int xRelShift = 0; From b93375262b3afafc3ca99b703d3f9f0fd9d359ea Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:41:39 +0100 Subject: [PATCH 13/22] Try to use getopt.h on windows --- tools/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/main.cpp b/tools/main.cpp index c3eca7deec5..4d3e16baab7 100644 --- a/tools/main.cpp +++ b/tools/main.cpp @@ -13,11 +13,11 @@ #include #include -#ifndef _WIN32 +//#ifndef _WIN32 #include -#else -#include "win_getopt.h" -#endif +//#else +//#include "win_getopt.h" +//#endif //---------------------------------------------------------------------------- From 3d4f5d12ec056450f3a7088d1403f6f774beac06 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:45:37 +0100 Subject: [PATCH 14/22] Revert "Try to use getopt.h on windows" This reverts commit b93375262b3afafc3ca99b703d3f9f0fd9d359ea. --- tools/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/main.cpp b/tools/main.cpp index 4d3e16baab7..c3eca7deec5 100644 --- a/tools/main.cpp +++ b/tools/main.cpp @@ -13,11 +13,11 @@ #include #include -//#ifndef _WIN32 +#ifndef _WIN32 #include -//#else -//#include "win_getopt.h" -//#endif +#else +#include "win_getopt.h" +#endif //---------------------------------------------------------------------------- From 1b3c74e091e3dd7d0384b28735222145caabbd92 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:46:01 +0100 Subject: [PATCH 15/22] Make char * const --- include/win32/win_getopt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/win32/win_getopt.h b/include/win32/win_getopt.h index 1dd690ee212..b9d07be071e 100644 --- a/include/win32/win_getopt.h +++ b/include/win32/win_getopt.h @@ -76,7 +76,7 @@ static int parse_long_options(char * const *, const char *, static int gcd(int, int); static void permute_args(int, int, int, char * const *); -static char *place = EMSG; /* option letter processing */ +static const char *place = EMSG; /* option letter processing */ /* XXX: set optreset to 1 rather than these two */ static int nonopt_start = -1; /* first non option argument (for permute) */ From 44c829c0e3ccd75137329d354059afbb23e5d61f Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:49:45 +0100 Subject: [PATCH 16/22] Change another char * to const --- include/win32/win_getopt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/win32/win_getopt.h b/include/win32/win_getopt.h index b9d07be071e..6a5f0c60b19 100644 --- a/include/win32/win_getopt.h +++ b/include/win32/win_getopt.h @@ -243,7 +243,8 @@ static int parse_long_options(char * const *nargv, const char *options, const struct option *long_options, int *idx, int short_too) { - char *current_argv, *has_equal; + const char *current_argv; + char *has_equal; size_t current_argv_len; int i, ambiguous, match; From f0f71b2883aa729b3bf129817f4b0a4bec75494e Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:52:18 +0100 Subject: [PATCH 17/22] Change one more to const --- include/win32/win_getopt.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/win32/win_getopt.h b/include/win32/win_getopt.h index 6a5f0c60b19..007b5ac37a6 100644 --- a/include/win32/win_getopt.h +++ b/include/win32/win_getopt.h @@ -243,8 +243,7 @@ static int parse_long_options(char * const *nargv, const char *options, const struct option *long_options, int *idx, int short_too) { - const char *current_argv; - char *has_equal; + const char *current_argv, *has_equal; size_t current_argv_len; int i, ambiguous, match; From a5d89dfcbd8f40a71587eb8745b733cd1e450d00 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 16:55:13 +0100 Subject: [PATCH 18/22] One more --- include/win32/win_getopt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/win32/win_getopt.h b/include/win32/win_getopt.h index 007b5ac37a6..d8dd0019aee 100644 --- a/include/win32/win_getopt.h +++ b/include/win32/win_getopt.h @@ -36,7 +36,7 @@ int optopt = '?'; /* character checked for validity */ #undef optreset /* see getopt.h */ #define optreset __mingw_optreset int optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ +const char *optarg; /* argument associated with option */ #endif //extern int optind; /* index of first non-option in argv */ From 5ef32ede5819a163d4eb95bfc2e5257bd00c8e01 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 17:14:07 +0100 Subject: [PATCH 19/22] Fix compiler warning warning C5055 --- src/measure.cpp | 2 +- src/midifunctor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/measure.cpp b/src/measure.cpp index 4439fe36ce8..9685588985b 100644 --- a/src/measure.cpp +++ b/src/measure.cpp @@ -497,7 +497,7 @@ int Measure::EnclosesTime(int time) const { int repeat = 1; double timeDuration - = m_measureAligner.GetRightAlignment()->GetTime() * DURATION_4 / DUR_MAX * 60.0 / m_currentTempo * 1000.0 + 0.5; + = m_measureAligner.GetRightAlignment()->GetTime() * static_cast(DURATION_4) / DUR_MAX * 60.0 / m_currentTempo * 1000.0 + 0.5; std::vector::const_iterator iter; for (iter = m_realTimeOffsetMilliseconds.begin(); iter != m_realTimeOffsetMilliseconds.end(); ++iter) { if ((time >= *iter) && (time <= *iter + timeDuration)) return repeat; diff --git a/src/midifunctor.cpp b/src/midifunctor.cpp index cdff91503cc..e69294e662f 100644 --- a/src/midifunctor.cpp +++ b/src/midifunctor.cpp @@ -240,7 +240,7 @@ FunctorCode InitMaxMeasureDurationFunctor::VisitMeasureEnd(Measure *measure) measure->SetCurrentTempo(tempo); const double scoreTimeIncrement - = measure->m_measureAligner.GetRightAlignment()->GetTime() * m_multiRestFactor * DURATION_4 / DUR_MAX; + = measure->m_measureAligner.GetRightAlignment()->GetTime() * m_multiRestFactor * static_cast(DURATION_4) / DUR_MAX; m_currentScoreTime += scoreTimeIncrement; m_currentRealTimeSeconds += scoreTimeIncrement * 60.0 / tempo; m_multiRestFactor = 1; @@ -698,7 +698,7 @@ FunctorCode GenerateMIDIFunctor::VisitPedal(const Pedal *pedal) { if (!pedal->HasDir()) return FUNCTOR_CONTINUE; - double pedalTime = pedal->GetStart()->GetAlignment()->GetTime() * DURATION_4 / DUR_MAX; + double pedalTime = pedal->GetStart()->GetAlignment()->GetTime() * static_cast(DURATION_4) / DUR_MAX; double startTime = m_totalTime + pedalTime; int tpq = m_midiFile->getTPQ(); From 533f30dc93f80d1dcc7728e8b968decd027536c0 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 17:14:30 +0100 Subject: [PATCH 20/22] Fix compiler warning C4305 --- src/view_neume.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view_neume.cpp b/src/view_neume.cpp index eeeaed614b1..971a8bf3304 100644 --- a/src/view_neume.cpp +++ b/src/view_neume.cpp @@ -74,10 +74,10 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff struct drawingParams { wchar_t fontNo = SMUFL_E990_chantPunctum; wchar_t fontNoLiq[5] = {}; - float xOffset = 0; - float yOffset = 0; - float xOffsetLiq[5] = { 0, 0, 0, 0, 0 }; - float yOffsetLiq[5] = { 0, 0, 0, 0, 0 }; + double xOffset = 0; + double yOffset = 0; + double xOffsetLiq[5] = { 0, 0, 0, 0, 0 }; + double yOffsetLiq[5] = { 0, 0, 0, 0, 0 }; }; std::vector params; params.push_back(drawingParams()); From 46e8e9059ae148b1e2aeae3839a6f0e8714a0dbb Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 25 Jan 2024 17:32:31 +0100 Subject: [PATCH 21/22] Fix formatting --- src/measure.cpp | 5 +++-- src/midifunctor.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/measure.cpp b/src/measure.cpp index 9685588985b..7b566400378 100644 --- a/src/measure.cpp +++ b/src/measure.cpp @@ -496,8 +496,9 @@ const Staff *Measure::GetBottomVisibleStaff() const int Measure::EnclosesTime(int time) const { int repeat = 1; - double timeDuration - = m_measureAligner.GetRightAlignment()->GetTime() * static_cast(DURATION_4) / DUR_MAX * 60.0 / m_currentTempo * 1000.0 + 0.5; + double timeDuration = m_measureAligner.GetRightAlignment()->GetTime() * static_cast(DURATION_4) / DUR_MAX + * 60.0 / m_currentTempo * 1000.0 + + 0.5; std::vector::const_iterator iter; for (iter = m_realTimeOffsetMilliseconds.begin(); iter != m_realTimeOffsetMilliseconds.end(); ++iter) { if ((time >= *iter) && (time <= *iter + timeDuration)) return repeat; diff --git a/src/midifunctor.cpp b/src/midifunctor.cpp index e69294e662f..5bf7f6246e8 100644 --- a/src/midifunctor.cpp +++ b/src/midifunctor.cpp @@ -239,8 +239,8 @@ FunctorCode InitMaxMeasureDurationFunctor::VisitMeasureEnd(Measure *measure) const double tempo = this->GetAdjustedTempo(); measure->SetCurrentTempo(tempo); - const double scoreTimeIncrement - = measure->m_measureAligner.GetRightAlignment()->GetTime() * m_multiRestFactor * static_cast(DURATION_4) / DUR_MAX; + const double scoreTimeIncrement = measure->m_measureAligner.GetRightAlignment()->GetTime() * m_multiRestFactor + * static_cast(DURATION_4) / DUR_MAX; m_currentScoreTime += scoreTimeIncrement; m_currentRealTimeSeconds += scoreTimeIncrement * 60.0 / tempo; m_multiRestFactor = 1; From 98e5533bd3524c70ca95e91c103206b9fff67026 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Mon, 29 Jan 2024 12:54:22 +0100 Subject: [PATCH 22/22] Adjust README and CHANGELOG --- CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a415ca506a..fdc3eedc0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [unreleased] * Support for `fTrem@unitdur` (@eNote-GmbH) +* Upgrade to C++20 ## [4.1.0] - 2023-12-15 * Support for staves ordered by `scoreDef` diff --git a/README.md b/README.md index fbed8c471cc..6de43d50cf1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Verovio is a fast, portable and lightweight library for engraving [Music Encoding Initiative (MEI)](http://www.music-encoding.org) digital scores into SVG images. Verovio also contains on-the-fly converters to render [Plaine & Easie Code](https://www.iaml.info/plaine-easie-code), [Humdrum](https://www.humdrum.org), [Musedata](https://musedata.org), [MusicXML](https://www.musicxml.com), [EsAC](http://esac-data.org), and [ABC](https://en.wikipedia.org/wiki/ABC_notation) digital scores. -Verovio is written in standard 2017 C++ and can be compiled as a standalone command-line tool, used as a compiled music-rendering library for applications (Qt, python), or compiled into Javascript using the Emscripten LLVM-to-JavaScript compiler. Check out the JavaScript toolkit version of verovio running in the [MEI Viewer](http://www.verovio.org/mei-viewer.xhtml) as well as the [app](http://www.verovio.org/app.html) or [tutorials](https://book.verovio.org/first-steps/) for web integration and user interaction. +Verovio is written in standard 2020 C++ and can be compiled as a standalone command-line tool, used as a compiled music-rendering library for applications (Qt, python), or compiled into Javascript using the Emscripten LLVM-to-JavaScript compiler. Check out the JavaScript toolkit version of verovio running in the [MEI Viewer](http://www.verovio.org/mei-viewer.xhtml) as well as the [app](http://www.verovio.org/app.html) or [tutorials](https://book.verovio.org/first-steps/) for web integration and user interaction. ![Choice interaction](https://raw.githubusercontent.com/rism-digital/verovio.org/gh-pages/movies/reflow.gif)