Explicitly cast to an off_t

On OS X the `off_t` claims to be a long long, and the definition of
`min` complains about conflicting types.
This commit is contained in:
Russ Garrett
2016-05-02 20:13:40 +01:00
parent ecdc01986b
commit e38703c4ae

View File

@@ -37,7 +37,7 @@ template <typename Tin, typename Tout>
std::unique_ptr<Tout[]> SampleBuffer<Tin, Tout>::getSamples(off_t start, off_t length)
{
// TODO: base this on the actual history required
auto history = std::min(start, 256L);
auto history = std::min(start, (off_t)256);
auto samples = src->getSamples(start - history, length + history);
if (samples == nullptr)
return nullptr;