diff --git a/Frameworks/OpenMPT/OpenMPT/.clang-format b/Frameworks/OpenMPT/OpenMPT/.clang-format index 054b59870..7cdfd647f 100644 --- a/Frameworks/OpenMPT/OpenMPT/.clang-format +++ b/Frameworks/OpenMPT/OpenMPT/.clang-format @@ -100,10 +100,12 @@ NamespaceMacros: [] #? #ObjCBreakBeforeNestedBlockParam #ObjCSpaceAfterProperty #ObjCSpaceBeforeProtocolList +PackConstructorInitializers: Never #PenaltyBreakAssignment #PenaltyBreakBeforeFirstCallParameter #PenaltyBreakComment #PenaltyBreakFirstLessLess +#PenaltyBreakOpenParenthesis #PenaltyBreakString #PenaltyBreakTemplateDeclaration #PenaltyExcessCharacter @@ -111,9 +113,13 @@ NamespaceMacros: [] #? #PenaltyReturnTypeOnItsOwnLine PointerAlignment: Right PPIndentWidth: -1 +QualifierAlignment: Leave +#QualifierOrder: ['static', 'inline', 'constexpr', 'volatile', 'const', 'restrict', 'type'] #RawStringFormats ReferenceAlignment: Pointer ReflowComments: false +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortIncludes: false #SortJavaStaticImport @@ -128,6 +134,16 @@ SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: Never +SpaceBeforeParensOptions: + AfterControlStatements: false + AfterForeachMacros: false + AfterFunctionDeclarationName: false + AfterFunctionDefinitionName: false + AfterIfMacros: false + AfterOverloadedOperator: false + #AfterRequiresInClause: false + #AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: false diff --git a/Frameworks/OpenMPT/OpenMPT/build/dist.mk b/Frameworks/OpenMPT/OpenMPT/build/dist.mk index 2ad7aeae8..90c4d0d7c 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/dist.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/dist.mk @@ -1,4 +1,4 @@ -MPT_SVNVERSION=17609 -MPT_SVNURL=https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30 -MPT_SVNDATE=2022-06-30T15:43:27.573631Z +MPT_SVNVERSION=17761 +MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.5 +MPT_SVNDATE=2022-08-21T11:52:57.985463Z diff --git a/Frameworks/OpenMPT/OpenMPT/build/make/config-defaults.mk b/Frameworks/OpenMPT/OpenMPT/build/make/config-defaults.mk index bc765dfe4..63af1f984 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/make/config-defaults.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/make/config-defaults.mk @@ -36,7 +36,6 @@ include build/make/config-gcc.mk else ifeq ($(HOST_FLAVOUR),FREEBSD) include build/make/config-clang.mk -NO_LTDL?=1 NO_PORTAUDIOCPP?=1 else ifeq ($(HOST_FLAVOUR),OPENBSD) diff --git a/Frameworks/OpenMPT/OpenMPT/build/make/config-djgpp.mk b/Frameworks/OpenMPT/OpenMPT/build/make/config-djgpp.mk index 32338f838..8d545cf00 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/make/config-djgpp.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/make/config-djgpp.mk @@ -61,12 +61,9 @@ NO_VORBIS=1 NO_VORBISFILE=1 endif -NO_LTDL=1 -NO_DL=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 -NO_SDL=1 NO_SDL2=1 NO_SNDFILE=1 NO_FLAC=1 diff --git a/Frameworks/OpenMPT/OpenMPT/build/make/config-emscripten.mk b/Frameworks/OpenMPT/OpenMPT/build/make/config-emscripten.mk index c16f807f8..164750b15 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/make/config-emscripten.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/make/config-emscripten.mk @@ -156,12 +156,9 @@ NO_OGG=1 NO_VORBIS=1 NO_VORBISFILE=1 endif -NO_LTDL=1 -NO_DL=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 -NO_SDL=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1 diff --git a/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-w64.mk b/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-w64.mk index 4ea030819..866ef8624 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-w64.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-w64.mk @@ -115,8 +115,6 @@ else IS_CROSS=1 NO_ZLIB=1 -NO_LTDL=1 -NO_DL=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 @@ -124,7 +122,6 @@ NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 -NO_SDL=1 NO_SDL2=1 NO_SNDFILE=1 NO_FLAC=1 diff --git a/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-win9x.mk b/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-win9x.mk index 64236f6a8..2b45529b3 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-win9x.mk +++ b/Frameworks/OpenMPT/OpenMPT/build/make/config-mingw-win9x.mk @@ -54,8 +54,6 @@ XMP_OPENMPT=1 IS_CROSS=1 NO_ZLIB=1 -NO_LTDL=1 -NO_DL=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 @@ -63,7 +61,6 @@ NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 -NO_SDL=1 NO_SDL2=1 NO_SNDFILE=1 NO_FLAC=1 diff --git a/Frameworks/OpenMPT/OpenMPT/build/svn_version/svn_version.h b/Frameworks/OpenMPT/OpenMPT/build/svn_version/svn_version.h index 022b8dda2..b23941a08 100644 --- a/Frameworks/OpenMPT/OpenMPT/build/svn_version/svn_version.h +++ b/Frameworks/OpenMPT/OpenMPT/build/svn_version/svn_version.h @@ -1,10 +1,10 @@ #pragma once -#define OPENMPT_VERSION_SVNVERSION "17609" -#define OPENMPT_VERSION_REVISION 17609 +#define OPENMPT_VERSION_SVNVERSION "17761" +#define OPENMPT_VERSION_REVISION 17761 #define OPENMPT_VERSION_DIRTY 0 #define OPENMPT_VERSION_MIXEDREVISIONS 0 -#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30" -#define OPENMPT_VERSION_DATE "2022-06-30T15:43:27.573631Z" +#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.6.5" +#define OPENMPT_VERSION_DATE "2022-08-21T11:52:57.985463Z" #define OPENMPT_VERSION_IS_PACKAGE 1 diff --git a/Frameworks/OpenMPT/OpenMPT/common/versionNumber.h b/Frameworks/OpenMPT/OpenMPT/common/versionNumber.h index 169da984f..9977ea22c 100644 --- a/Frameworks/OpenMPT/OpenMPT/common/versionNumber.h +++ b/Frameworks/OpenMPT/OpenMPT/common/versionNumber.h @@ -17,7 +17,7 @@ OPENMPT_NAMESPACE_BEGIN // Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 30 -#define VER_MINOR 05 -#define VER_MINORMINOR 01 +#define VER_MINOR 06 +#define VER_MINORMINOR 00 OPENMPT_NAMESPACE_END diff --git a/Frameworks/OpenMPT/OpenMPT/examples/.clang-format b/Frameworks/OpenMPT/OpenMPT/examples/.clang-format index 0278edcaf..ca83758a5 100644 --- a/Frameworks/OpenMPT/OpenMPT/examples/.clang-format +++ b/Frameworks/OpenMPT/OpenMPT/examples/.clang-format @@ -1,4 +1,4 @@ -# clang-format 13 +# clang-format 14 Language: Cpp Standard: c++20 @@ -101,10 +101,12 @@ NamespaceMacros: [] #? #ObjCBreakBeforeNestedBlockParam #ObjCSpaceAfterProperty #ObjCSpaceBeforeProtocolList +PackConstructorInitializers: Never #PenaltyBreakAssignment #PenaltyBreakBeforeFirstCallParameter #PenaltyBreakComment #PenaltyBreakFirstLessLess +#PenaltyBreakOpenParenthesis #PenaltyBreakString #PenaltyBreakTemplateDeclaration #PenaltyExcessCharacter @@ -113,8 +115,12 @@ NamespaceMacros: [] #? PointerAlignment: Middle PPIndentWidth: -1 #RawStringFormats +QualifierAlignment: Leave +#QualifierOrder: ['static', 'inline', 'constexpr', 'volatile', 'const', 'restrict', 'type'] ReferenceAlignment: Pointer ReflowComments: false +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortIncludes: false #SortJavaStaticImport @@ -129,6 +135,16 @@ SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDeclarationName: false + AfterFunctionDefinitionName: false + AfterIfMacros: true + AfterOverloadedOperator: false + #AfterRequiresInClause: false + #AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: true diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/.clang-format b/Frameworks/OpenMPT/OpenMPT/libopenmpt/.clang-format index 0278edcaf..ca83758a5 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/.clang-format +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/.clang-format @@ -1,4 +1,4 @@ -# clang-format 13 +# clang-format 14 Language: Cpp Standard: c++20 @@ -101,10 +101,12 @@ NamespaceMacros: [] #? #ObjCBreakBeforeNestedBlockParam #ObjCSpaceAfterProperty #ObjCSpaceBeforeProtocolList +PackConstructorInitializers: Never #PenaltyBreakAssignment #PenaltyBreakBeforeFirstCallParameter #PenaltyBreakComment #PenaltyBreakFirstLessLess +#PenaltyBreakOpenParenthesis #PenaltyBreakString #PenaltyBreakTemplateDeclaration #PenaltyExcessCharacter @@ -113,8 +115,12 @@ NamespaceMacros: [] #? PointerAlignment: Middle PPIndentWidth: -1 #RawStringFormats +QualifierAlignment: Leave +#QualifierOrder: ['static', 'inline', 'constexpr', 'volatile', 'const', 'restrict', 'type'] ReferenceAlignment: Pointer ReflowComments: false +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortIncludes: false #SortJavaStaticImport @@ -129,6 +135,16 @@ SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDeclarationName: false + AfterFunctionDefinitionName: false + AfterIfMacros: true + AfterOverloadedOperator: false + #AfterRequiresInClause: false + #AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: true diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/changelog.md b/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/changelog.md index 6bc62af43..033999b35 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/changelog.md +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/changelog.md @@ -5,7 +5,7 @@ Changelog {#changelog} For fully detailed change log, please see the source repository directly. This is just a high-level summary. -### libopenmpt 0.6.5-pre +### libopenmpt 0.6.5 (2022-08-21) * [**Bug**] `Makefile` now also uses `CC`, `CXX`, `LD`, and `AR` when set as environment variables. @@ -14,7 +14,15 @@ is just a high-level summary. * [**New**] `Makefile` now uses `PKG_CONFIG` as path to `pkg-config`. - * mpg123: Update to v1.30.0 (2022-06-26). + * DBM: Sample middle-C frequencies were slightly off. + laffik_-_marynarze.dbm sounds much more bearable now. + * DBM: Fixed pattern break parameter interpretation. + * Echo DMO: Setting the delay parameter to 0 yielded a 2-second echo delay + instead of 1ms. + * Digi Booster Echo: Setting the delay parameter to 0 yielded a 510ms echo + delay instead of approximately 334ms. + + * mpg123: Update to v1.30.2 (2022-08-01). ### libopenmpt 0.6.4 (2022-06-12) diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/packaging.md b/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/packaging.md index 288420318..f8cf97ba1 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/packaging.md +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/dox/packaging.md @@ -11,7 +11,7 @@ Packaging * libopenmpt (since 0.3) uses SemVer 2.0.0 versioning. See [semver.org](https://semver.org/spec/v2.0.0.html). Clause 4 is ignored for libopenmpt, which means that libopenmpt will also provide API/ABI - compatbility semantics for pre-1.0.0 versions as required by SemVer 2.0.0 + compatibility semantics for pre-1.0.0 versions as required by SemVer 2.0.0 only for post-1.0.0 versions. The SemVer versioning scheme is incompatible with Debian/Ubuntu package versions, however it can easily be processed to be compatible by replacing '-' (hyphen) with '~' (tilde). It is recommended diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_impl.cpp b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_impl.cpp index 45aa54e43..105d8e9d8 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_impl.cpp +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_impl.cpp @@ -77,10 +77,6 @@ MPT_WARNING("Warning: libopenmpt for WinRT is built with reduced functionality. #else #pragma comment(lib, "rpcrt4.lib") #endif -#ifndef NO_DMO -#pragma comment(lib, "dmoguids.lib") -#pragma comment(lib, "strmiids.lib") -#endif // !NO_DMO #endif // MPT_BUILD_MSVC #if MPT_PLATFORM_MULTITHREADED && MPT_MUTEX_NONE diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.h b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.h index 667a9812f..b3342e46d 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.h +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.h @@ -23,9 +23,9 @@ /*! \brief libopenmpt patch version number */ #define OPENMPT_API_VERSION_PATCH 5 /*! \brief libopenmpt pre-release tag */ -#define OPENMPT_API_VERSION_PREREL "-pre.1" +#define OPENMPT_API_VERSION_PREREL "" /*! \brief libopenmpt pre-release flag */ -#define OPENMPT_API_VERSION_IS_PREREL 1 +#define OPENMPT_API_VERSION_IS_PREREL 0 /*! \brief libopenmpt version number as a single integer value * \since 0.3 diff --git a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.mk b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.mk index 67db43f12..184e5400c 100644 --- a/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.mk +++ b/Frameworks/OpenMPT/OpenMPT/libopenmpt/libopenmpt_version.mk @@ -1,7 +1,7 @@ LIBOPENMPT_VERSION_MAJOR=0 LIBOPENMPT_VERSION_MINOR=6 LIBOPENMPT_VERSION_PATCH=5 -LIBOPENMPT_VERSION_PREREL=-pre.1 +LIBOPENMPT_VERSION_PREREL= LIBOPENMPT_LTVER_CURRENT=3 LIBOPENMPT_LTVER_REVISION=5 diff --git a/Frameworks/OpenMPT/OpenMPT/openmpt123/.clang-format b/Frameworks/OpenMPT/OpenMPT/openmpt123/.clang-format index 0278edcaf..ca83758a5 100644 --- a/Frameworks/OpenMPT/OpenMPT/openmpt123/.clang-format +++ b/Frameworks/OpenMPT/OpenMPT/openmpt123/.clang-format @@ -1,4 +1,4 @@ -# clang-format 13 +# clang-format 14 Language: Cpp Standard: c++20 @@ -101,10 +101,12 @@ NamespaceMacros: [] #? #ObjCBreakBeforeNestedBlockParam #ObjCSpaceAfterProperty #ObjCSpaceBeforeProtocolList +PackConstructorInitializers: Never #PenaltyBreakAssignment #PenaltyBreakBeforeFirstCallParameter #PenaltyBreakComment #PenaltyBreakFirstLessLess +#PenaltyBreakOpenParenthesis #PenaltyBreakString #PenaltyBreakTemplateDeclaration #PenaltyExcessCharacter @@ -113,8 +115,12 @@ NamespaceMacros: [] #? PointerAlignment: Middle PPIndentWidth: -1 #RawStringFormats +QualifierAlignment: Leave +#QualifierOrder: ['static', 'inline', 'constexpr', 'volatile', 'const', 'restrict', 'type'] ReferenceAlignment: Pointer ReflowComments: false +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortIncludes: false #SortJavaStaticImport @@ -129,6 +135,16 @@ SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDeclarationName: false + AfterFunctionDefinitionName: false + AfterIfMacros: true + AfterOverloadedOperator: false + #AfterRequiresInClause: false + #AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: true diff --git a/Frameworks/OpenMPT/OpenMPT/openmpt123/openmpt123.hpp b/Frameworks/OpenMPT/OpenMPT/openmpt123/openmpt123.hpp index e8d6d46d2..878359aa3 100644 --- a/Frameworks/OpenMPT/OpenMPT/openmpt123/openmpt123.hpp +++ b/Frameworks/OpenMPT/OpenMPT/openmpt123/openmpt123.hpp @@ -376,16 +376,18 @@ struct commandlineflags { } #else // WIN32 if ( isatty( STDERR_FILENO ) ) { - if ( std::getenv( "COLUMNS" ) ) { - std::istringstream istr( std::getenv( "COLUMNS" ) ); + const char * env_columns = std::getenv( "COLUMNS" ); + if ( env_columns ) { + std::istringstream istr( env_columns ); int tmp = 0; istr >> tmp; if ( tmp > 0 ) { terminal_width = tmp; } } - if ( std::getenv( "ROWS" ) ) { - std::istringstream istr( std::getenv( "ROWS" ) ); + const char * env_rows = std::getenv( "ROWS" ); + if ( env_rows ) { + std::istringstream istr( env_rows ); int tmp = 0; istr >> tmp; if ( tmp > 0 ) { diff --git a/Frameworks/OpenMPT/OpenMPT/soundlib/Load_dbm.cpp b/Frameworks/OpenMPT/OpenMPT/soundlib/Load_dbm.cpp index dd90f296f..1b8fdf9b5 100644 --- a/Frameworks/OpenMPT/OpenMPT/soundlib/Load_dbm.cpp +++ b/Frameworks/OpenMPT/OpenMPT/soundlib/Load_dbm.cpp @@ -161,6 +161,10 @@ static void ConvertDBMEffect(uint8 &command, uint8 ¶m) command = CMD_NONE; break; + case CMD_PATTERNBREAK: + param = ((param >> 4) * 10) + (param & 0x0F); + break; + #ifdef MODPLUG_TRACKER case CMD_VIBRATO: if(param & 0x0F) @@ -425,7 +429,7 @@ bool CSoundFile::ReadDBM(FileReader &file, ModLoadingFlags loadFlags) ModSample &mptSmp = Samples[instrHeader.sample]; mptSmp.Initialize(); mptSmp.nVolume = std::min(static_cast(instrHeader.volume), uint16(64)) * 4u; - mptSmp.nC5Speed = instrHeader.sampleRate; + mptSmp.nC5Speed = Util::muldivr(instrHeader.sampleRate, 8303, 8363); if(instrHeader.loopLength && (instrHeader.flags & (DBMInstrument::smpLoop | DBMInstrument::smpPingPongLoop))) { diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/.clang-format b/Frameworks/OpenMPT/OpenMPT/src/mpt/.clang-format index 01ba8d730..058b40db5 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/.clang-format +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/.clang-format @@ -1,4 +1,4 @@ -# clang-format 13 +# clang-format 14 Language: Cpp Standard: c++20 @@ -101,10 +101,12 @@ NamespaceMacros: [] #? #ObjCBreakBeforeNestedBlockParam #ObjCSpaceAfterProperty #ObjCSpaceBeforeProtocolList +PackConstructorInitializers: Never #PenaltyBreakAssignment #PenaltyBreakBeforeFirstCallParameter #PenaltyBreakComment #PenaltyBreakFirstLessLess +#PenaltyBreakOpenParenthesis #PenaltyBreakString #PenaltyBreakTemplateDeclaration #PenaltyExcessCharacter @@ -113,8 +115,12 @@ NamespaceMacros: [] #? PointerAlignment: Middle PPIndentWidth: -1 #RawStringFormats +QualifierAlignment: Leave +#QualifierOrder: ['static', 'inline', 'constexpr', 'volatile', 'const', 'restrict', 'type'] ReferenceAlignment: Pointer ReflowComments: false +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortIncludes: false #SortJavaStaticImport @@ -129,6 +135,16 @@ SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDeclarationName: false + AfterFunctionDefinitionName: false + AfterIfMacros: true + AfterOverloadedOperator: false + #AfterRequiresInClause: false + #AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeSquareBrackets: false SpaceInEmptyBlock: true diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/detect_compiler.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/detect_compiler.hpp index aeed0896e..936286705 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/detect_compiler.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/detect_compiler.hpp @@ -50,7 +50,9 @@ #elif defined(_MSC_VER) #define MPT_COMPILER_MSVC 1 -#if (_MSC_VER >= 1932) +#if (_MSC_VER >= 1933) +#define MPT_COMPILER_MSVC_VERSION MPT_COMPILER_MAKE_VERSION2(2022, 3) +#elif (_MSC_VER >= 1932) #define MPT_COMPILER_MSVC_VERSION MPT_COMPILER_MAKE_VERSION2(2022, 2) #elif (_MSC_VER >= 1931) #define MPT_COMPILER_MSVC_VERSION MPT_COMPILER_MAKE_VERSION2(2022, 1) diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/semantic_version.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/semantic_version.hpp index 3315da330..826ac059f 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/semantic_version.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/semantic_version.hpp @@ -28,22 +28,22 @@ struct semantic_version { } }; -constexpr bool operator==(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator==(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() == b.as_tuple(); } -constexpr bool operator!=(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator!=(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() != b.as_tuple(); } -constexpr bool operator<(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator<(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() < b.as_tuple(); } -constexpr bool operator>(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator>(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() > b.as_tuple(); } -constexpr bool operator<=(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator<=(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() <= b.as_tuple(); } -constexpr bool operator>=(semantic_version const a, semantic_version const b) noexcept { +constexpr bool operator>=(const semantic_version a, const semantic_version b) noexcept { return a.as_tuple() >= b.as_tuple(); } @@ -54,7 +54,7 @@ struct version_info { return std::make_tuple(semver.as_tuple(), build); } template - friend Tostream & operator<<(Tostream & os, version_info const vi) { + friend Tostream & operator<<(Tostream & os, const version_info vi) { if (vi.build > 0) { os << vi.semver.major << "." << vi.semver.minor << "." << vi.semver.patch << "+build." << vi.build; } else { @@ -64,22 +64,22 @@ struct version_info { } }; -constexpr bool operator==(version_info const a, version_info const b) noexcept { +constexpr bool operator==(const version_info a, const version_info b) noexcept { return a.as_tuple() == b.as_tuple(); } -constexpr bool operator!=(version_info const a, version_info const b) noexcept { +constexpr bool operator!=(const version_info a, const version_info b) noexcept { return a.as_tuple() != b.as_tuple(); } -constexpr bool operator<(version_info const a, version_info const b) noexcept { +constexpr bool operator<(const version_info a, const version_info b) noexcept { return a.as_tuple() < b.as_tuple(); } -constexpr bool operator>(version_info const a, version_info const b) noexcept { +constexpr bool operator>(const version_info a, const version_info b) noexcept { return a.as_tuple() > b.as_tuple(); } -constexpr bool operator<=(version_info const a, version_info const b) noexcept { +constexpr bool operator<=(const version_info a, const version_info b) noexcept { return a.as_tuple() <= b.as_tuple(); } -constexpr bool operator>=(version_info const a, version_info const b) noexcept { +constexpr bool operator>=(const version_info a, const version_info b) noexcept { return a.as_tuple() >= b.as_tuple(); } diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/span.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/span.hpp index 023cc406a..4a4d9c661 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/base/span.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/base/span.hpp @@ -122,11 +122,11 @@ public: return m_data[index]; } - bool operator==(span const & other) const noexcept { + bool operator==(const span & other) const noexcept { return size() == other.size() && (m_data == other.m_data || std::equal(begin(), end(), other.begin())); } - bool operator!=(span const & other) const noexcept { + bool operator!=(const span & other) const noexcept { return !(*this == other); } diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/format/simple_spec.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/format/simple_spec.hpp index 78ba576ee..797a61994 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/format/simple_spec.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/format/simple_spec.hpp @@ -46,7 +46,11 @@ private: char group_sep; // int public: MPT_CONSTEXPRINLINE format_simple_spec() noexcept - : flags(0), width(0), precision(-1), group(0), group_sep(',') { } + : flags(0) + , width(0) + , precision(-1) + , group(0) + , group_sep(',') { } MPT_CONSTEXPRINLINE format_simple_flags GetFlags() const noexcept { return flags; } diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base.hpp index c993de000..fba96a8f4 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base.hpp @@ -63,7 +63,9 @@ private: public: FileDataWindow(std::shared_ptr src, pos_type off, pos_type len) - : data(src), dataOffset(off), dataLength(len) { } + : data(src) + , dataOffset(off) + , dataLength(len) { } bool IsValid() const override { return data->IsValid(); diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base_unseekable.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base_unseekable.hpp index c7a7d0c1d..78d9ca451 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base_unseekable.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_base_unseekable.hpp @@ -38,7 +38,8 @@ private: protected: FileDataUnseekable() - : cachesize(0), streamFullyCached(false) { + : cachesize(0) + , streamFullyCached(false) { return; } diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_memory.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_memory.hpp index 11c3b9855..004104c34 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_memory.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/io_read/filedata_memory.hpp @@ -33,9 +33,11 @@ private: public: FileDataMemory() - : streamData(nullptr), streamLength(0) { } + : streamData(nullptr) + , streamLength(0) { } FileDataMemory(mpt::const_byte_span data) - : streamData(data.data()), streamLength(data.size()) { } + : streamData(data.data()) + , streamLength(data.size()) { } public: bool IsValid() const override { diff --git a/Frameworks/OpenMPT/OpenMPT/src/mpt/osinfo/windows_version.hpp b/Frameworks/OpenMPT/OpenMPT/src/mpt/osinfo/windows_version.hpp index afcf6fec6..33c046eb4 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/mpt/osinfo/windows_version.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/mpt/osinfo/windows_version.hpp @@ -133,10 +133,10 @@ public: // return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 19043, 0); //#elif // NTDDI_WIN10_FE 20H2 // return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 19042, 0); -#elif NTDDI_VERSION >= 0x0A000008 // NTDDI_WIN10_MN 2004/20H1 +#elif NTDDI_VERSION >= 0x0A000009 // NTDDI_WIN10_MN 2004/20H1 return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 19041, 0); -//#elif // NTDDI_WIN10_VB 1909/19H2 -// return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 18363, 0); +#elif NTDDI_VERSION >= 0x0A000008 // NTDDI_WIN10_VB 1909/19H2 + return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 18363, 0); #elif NTDDI_VERSION >= 0x0A000007 // NTDDI_WIN10_19H1 1903/19H1 return mpt::osinfo::windows::Version(mpt::osinfo::windows::Version::Win10, mpt::osinfo::windows::Version::ServicePack(0, 0), 18362, 0); #elif NTDDI_VERSION >= 0x0A000006 // NTDDI_WIN10_RS5 1809 @@ -390,7 +390,7 @@ public: public: bool IsValid() const { - return true; + return valid; } private: diff --git a/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/Endian.hpp b/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/Endian.hpp index 4e00c0cd7..eb177e0a2 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/Endian.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/Endian.hpp @@ -62,7 +62,10 @@ using float64be_fast = mpt::IEEE754binary64BE; #define MPT_BINARY_STRUCT(type, size) \ - constexpr bool declare_binary_safe(const type &) { return true; } \ + constexpr bool declare_binary_safe(const type &) \ + { \ + return true; \ + } \ static_assert(mpt::check_binary_size(size)); \ /**/ diff --git a/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/FlagSet.hpp b/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/FlagSet.hpp index 14e0c8a8a..3f741e430 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/FlagSet.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/openmpt/base/FlagSet.hpp @@ -37,15 +37,23 @@ private: public: MPT_CONSTEXPRINLINE enum_value_type() noexcept - : bits(0) {} + : bits(0) + { + } MPT_CONSTEXPRINLINE enum_value_type(const enum_value_type &x) noexcept - : bits(x.bits) {} + : bits(x.bits) + { + } MPT_CONSTEXPRINLINE enum_value_type(enum_type x) noexcept - : bits(static_cast(x)) {} + : bits(static_cast(x)) + { + } private: explicit MPT_CONSTEXPRINLINE enum_value_type(store_type x) noexcept - : bits(x) {} // private in order to prevent accidental conversions. use from_bits. + : bits(x) + { + } // private in order to prevent accidental conversions. use from_bits. MPT_CONSTEXPRINLINE operator store_type() const noexcept { return bits; } // private in order to prevent accidental conversions. use as_bits. public: static MPT_CONSTEXPRINLINE enum_value_type from_bits(store_type bits) noexcept { return value_type(bits); } @@ -128,7 +136,9 @@ private: public: explicit MPT_CONSTEXPRINLINE Enum(enum_type val) noexcept - : value(val) {} + : value(val) + { + } MPT_CONSTEXPRINLINE operator enum_type() const noexcept { return value; } MPT_CONSTEXPRINLINE Enum &operator=(enum_type val) noexcept { @@ -425,10 +435,22 @@ public: // Declare typesafe logical operators for enum_t #define MPT_DECLARE_ENUM(enum_t) \ - MPT_CONSTEXPRINLINE enum_value_type operator|(enum_t a, enum_t b) noexcept { return enum_value_type(a) | enum_value_type(b); } \ - MPT_CONSTEXPRINLINE enum_value_type operator&(enum_t a, enum_t b) noexcept { return enum_value_type(a) & enum_value_type(b); } \ - MPT_CONSTEXPRINLINE enum_value_type operator^(enum_t a, enum_t b) noexcept { return enum_value_type(a) ^ enum_value_type(b); } \ - MPT_CONSTEXPRINLINE enum_value_type operator~(enum_t a) noexcept { return ~enum_value_type(a); } \ + MPT_CONSTEXPRINLINE enum_value_type operator|(enum_t a, enum_t b) noexcept \ + { \ + return enum_value_type(a) | enum_value_type(b); \ + } \ + MPT_CONSTEXPRINLINE enum_value_type operator&(enum_t a, enum_t b) noexcept \ + { \ + return enum_value_type(a) & enum_value_type(b); \ + } \ + MPT_CONSTEXPRINLINE enum_value_type operator^(enum_t a, enum_t b) noexcept \ + { \ + return enum_value_type(a) ^ enum_value_type(b); \ + } \ + MPT_CONSTEXPRINLINE enum_value_type operator~(enum_t a) noexcept \ + { \ + return ~enum_value_type(a); \ + } \ /**/ // backwards compatibility diff --git a/Frameworks/OpenMPT/OpenMPT/src/openmpt/soundbase/SampleDecode.hpp b/Frameworks/OpenMPT/OpenMPT/src/openmpt/soundbase/SampleDecode.hpp index 4d7585874..164004b09 100644 --- a/Frameworks/OpenMPT/OpenMPT/src/openmpt/soundbase/SampleDecode.hpp +++ b/Frameworks/OpenMPT/OpenMPT/src/openmpt/soundbase/SampleDecode.hpp @@ -73,7 +73,9 @@ struct DecodeInt8Delta static constexpr std::size_t input_inc = 1; uint8 delta; DecodeInt8Delta() - : delta(0) {} + : delta(0) + { + } MPT_FORCEINLINE output_t operator()(const input_t *inBuf) { delta += mpt::byte_cast(*inBuf); @@ -197,7 +199,9 @@ struct DecodeInt16Delta static constexpr std::size_t input_inc = 2; uint16 delta; DecodeInt16Delta() - : delta(0) {} + : delta(0) + { + } MPT_FORCEINLINE output_t operator()(const input_t *inBuf) { delta += mpt::byte_cast(inBuf[loByteIndex]) | (mpt::byte_cast(inBuf[hiByteIndex]) << 8); @@ -212,7 +216,9 @@ struct DecodeInt16Delta8 static constexpr std::size_t input_inc = 2; uint16 delta; DecodeInt16Delta8() - : delta(0) {} + : delta(0) + { + } MPT_FORCEINLINE output_t operator()(const input_t *inBuf) { delta += mpt::byte_cast(inBuf[0]);