From: <sv...@op...> - 2024-05-08 06:11:12
|
Author: manx Date: Wed May 8 08:11:05 2024 New Revision: 20726 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20726 Log: [Fix] Static (internal linkage) functions in namespace scope in headers can cause ODR-violations when used by external linkage inline functions. Modified: trunk/OpenMPT/soundlib/MixerInterface.h Modified: trunk/OpenMPT/soundlib/MixerInterface.h ============================================================================== --- trunk/OpenMPT/soundlib/MixerInterface.h Wed May 8 08:10:54 2024 (r20725) +++ trunk/OpenMPT/soundlib/MixerInterface.h Wed May 8 08:11:05 2024 (r20726) @@ -79,7 +79,7 @@ // FilterFunc: Functor for applying the resonant filter // MixFunc: Functor for mixing the computed sample data into the output buffer template<class Traits, class InterpolationFunc, class FilterFunc, class MixFunc> -static void SampleLoop(ModChannel &chn, const CResampler &resampler, typename Traits::output_t * MPT_RESTRICT outBuffer, unsigned int numSamples) +inline void SampleLoop(ModChannel &chn, const CResampler &resampler, typename Traits::output_t * MPT_RESTRICT outBuffer, unsigned int numSamples) { ModChannel &c = chn; const typename Traits::input_t * MPT_RESTRICT inSample = static_cast<const typename Traits::input_t *>(c.pCurrentSample); |