Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6cb8c125 authored by Thomas Eschenbacher's avatar Thomas Eschenbacher

bugfix: compression type lookup did not work when using static functions

parent 03253450
......@@ -77,6 +77,7 @@ bool Kwave::Compression::hasVBR() const
//***************************************************************************
Kwave::Compression::Type Kwave::Compression::fromInt(int i)
{
fillMap();
return (m_map.contains(static_cast<Kwave::Compression::Type>(i))) ?
static_cast<Kwave::Compression::Type>(i) : Kwave::Compression::NONE;
}
......@@ -208,6 +209,7 @@ int Kwave::Compression::toAudiofile(Kwave::Compression::Type compression)
{
int af_compression = AF_COMPRESSION_UNKNOWN;
fillMap();
switch (compression)
{
case Kwave::Compression::NONE:
......@@ -278,6 +280,7 @@ Kwave::Compression::Type Kwave::Compression::fromAudiofile(int af_compression)
{
Kwave::Compression::Type compression_type;
fillMap();
switch (af_compression)
{
case AF_COMPRESSION_NONE :
......
......@@ -133,7 +133,7 @@ namespace Kwave
private:
/** fills the map with known compression types (if empty) */
void fillMap();
static void fillMap();
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment