mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:57:36 +00:00
LibAudio: Make LoaderPlugin::error_string return String&
Previously, error_string() returned char* which is bad Serenity style and caused issues when other error handling methods were tried. As both WavLoader and (future) FLAC loader store a String internally for the error message, it makes sense to return a String reference instead.
This commit is contained in:
parent
d599a14545
commit
488de12ed4
2 changed files with 6 additions and 3 deletions
|
@ -39,7 +39,7 @@ public:
|
|||
virtual bool sniff() override { return valid; }
|
||||
|
||||
virtual bool has_error() override { return !m_error_string.is_null(); }
|
||||
virtual const char* error_string() override { return m_error_string.characters(); }
|
||||
virtual const String& error_string() override { return m_error_string; }
|
||||
|
||||
// The Buffer returned contains input data resampled at the
|
||||
// destination audio device sample rate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue