Updated libOpenMPT to version 0.6.5 final

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2022-08-21 15:56:54 -07:00
parent 58453a6b7d
commit d03afd6bf8
31 changed files with 198 additions and 79 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ) {

View File

@ -161,6 +161,10 @@ static void ConvertDBMEffect(uint8 &command, uint8 &param)
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<uint16>(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)))
{

View File

@ -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

View File

@ -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)

View File

@ -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 <typename Tostream>
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();
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -63,7 +63,9 @@ private:
public:
FileDataWindow(std::shared_ptr<const IFileData> 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();

View File

@ -38,7 +38,8 @@ private:
protected:
FileDataUnseekable()
: cachesize(0), streamFullyCached(false) {
: cachesize(0)
, streamFullyCached(false) {
return;
}

View File

@ -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 {

View File

@ -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:

View File

@ -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<type>(size)); \
/**/

View File

@ -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<store_type>(x)) {}
: bits(static_cast<store_type>(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<enum_t> operator|(enum_t a, enum_t b) noexcept { return enum_value_type<enum_t>(a) | enum_value_type<enum_t>(b); } \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator&(enum_t a, enum_t b) noexcept { return enum_value_type<enum_t>(a) & enum_value_type<enum_t>(b); } \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator^(enum_t a, enum_t b) noexcept { return enum_value_type<enum_t>(a) ^ enum_value_type<enum_t>(b); } \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator~(enum_t a) noexcept { return ~enum_value_type<enum_t>(a); } \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator|(enum_t a, enum_t b) noexcept \
{ \
return enum_value_type<enum_t>(a) | enum_value_type<enum_t>(b); \
} \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator&(enum_t a, enum_t b) noexcept \
{ \
return enum_value_type<enum_t>(a) & enum_value_type<enum_t>(b); \
} \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator^(enum_t a, enum_t b) noexcept \
{ \
return enum_value_type<enum_t>(a) ^ enum_value_type<enum_t>(b); \
} \
MPT_CONSTEXPRINLINE enum_value_type<enum_t> operator~(enum_t a) noexcept \
{ \
return ~enum_value_type<enum_t>(a); \
} \
/**/
// backwards compatibility

View File

@ -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<uint8>(*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<uint8>(inBuf[loByteIndex]) | (mpt::byte_cast<uint8>(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<uint8>(inBuf[0]);