Author: sagamusix
Date: Sat Jun 8 12:24:36 2024
New Revision: 20953
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20953
Log:
[Ref] Simplify workaround. We're not going to be able to use CSoundFile in a constexpr context anyway.
Modified:
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/soundlib/Sndfile.h
==============================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 08:18:38 2024 (r20952)
+++ trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 12:24:36 2024 (r20953)
@@ -705,11 +705,7 @@
constexpr SAMPLEINDEX GetNumSamples() const noexcept { return m_nSamples; }
constexpr PATTERNINDEX GetCurrentPattern() const noexcept { return m_PlayState.m_nPattern; }
constexpr ORDERINDEX GetCurrentOrder() const noexcept { return m_PlayState.m_nCurrentOrder; }
-#ifndef MPT_LIBCXX_QUIRK_NO_CONSTEXPR_VECTOR
- MPT_CONSTEXPR20_FUN CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); }
-#else
MPT_FORCEINLINE CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); }
-#endif
constexpr bool CanAddMoreSamples(SAMPLEINDEX amount = 1) const noexcept { return (amount < MAX_SAMPLES) && m_nSamples < (MAX_SAMPLES - amount); }
constexpr bool CanAddMoreInstruments(INSTRUMENTINDEX amount = 1) const noexcept { return (amount < MAX_INSTRUMENTS) && m_nInstruments < (MAX_INSTRUMENTS - amount); }
|