13
0

Replace boost::format with PBD::string_compose

This commit is contained in:
Robin Gareus 2024-11-06 22:55:56 +01:00
parent 9544855fdd
commit a3d4888be3
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1,7 +1,7 @@
#ifndef AUDIOGRAPHER_PROCESS_CONTEXT_H
#define AUDIOGRAPHER_PROCESS_CONTEXT_H
#include <boost/format.hpp>
#include "pbd/compose.h"
#include "audiographer/visibility.h"
#include "exception.h"
@ -71,9 +71,7 @@ public:
ProcessContext beginning (samplecnt_t samples)
{
if (throw_level (ThrowProcess) && samples > _samples) {
throw Exception (*this, boost::str (boost::format
("Trying to use too many samples of %1% for a new Context: %2% instead of %3%")
% DebugUtils::demangled_name (*this) % samples % _samples));
throw Exception (*this, string_compose ("Trying to use too many samples of %1 for a new Context: %2 instead of %3" ,DebugUtils::demangled_name (*this), samples, _samples));
}
validate_data ();
@ -115,9 +113,7 @@ protected:
inline void validate_data()
{
if (throw_level (ThrowProcess) && (_samples % _channels != 0)) {
throw Exception (*this, boost::str (boost::format
("Number of samples given to %1% was not a multiple of channels: %2% samples with %3% channels")
% DebugUtils::demangled_name (*this) % _samples % _channels));
throw Exception (*this, string_compose ("Number of samples given to %1% was not a multiple of channels: %2 samples with %3 channels", DebugUtils::demangled_name (*this), _samples, _channels));
}
}
};