Fix some compile warnings in taglib

This commit is contained in:
Jonas Kvinge
2020-04-23 21:00:16 +02:00
parent ac40094d37
commit c1ac2debb8
24 changed files with 64 additions and 90 deletions

View File

@@ -77,11 +77,6 @@ ByteVectorList::ByteVectorList() :
}
ByteVectorList::ByteVectorList(const ByteVectorList &l) : List<ByteVector>(l)
{
}
ByteVectorList::~ByteVectorList()
{

View File

@@ -53,13 +53,6 @@ namespace TagLib {
*/
virtual ~ByteVectorList();
/*!
* Make a shallow, implicitly shared, copy of \a l. Because this is
* implicitly shared, this method is lightweight and suitable for
* pass-by-value usage.
*/
ByteVectorList(const ByteVectorList &l);
/*!
* Convert the ByteVectorList to a ByteVector separated by \a separator. By
* default a space is used.

View File

@@ -43,8 +43,8 @@ public:
long position;
};
ByteVectorStream::ByteVectorStreamPrivate::ByteVectorStreamPrivate(const ByteVector &data) :
data(data),
ByteVectorStream::ByteVectorStreamPrivate::ByteVectorStreamPrivate(const ByteVector &_data) :
data(_data),
position(0)
{
}

View File

@@ -71,9 +71,9 @@ using namespace Strawberry_TagLib::TagLib;
class File::FilePrivate
{
public:
FilePrivate(IOStream *stream, bool owner) :
stream(stream),
streamOwner(owner),
FilePrivate(IOStream *_stream, bool _owner) :
stream(_stream),
streamOwner(_owner),
valid(true) {}
~FilePrivate()

View File

@@ -28,16 +28,10 @@
using namespace Strawberry_TagLib::TagLib;
PropertyMap::PropertyMap() : SimplePropertyMap()
{
}
PropertyMap::PropertyMap() : SimplePropertyMap() {}
PropertyMap::PropertyMap(const PropertyMap &m) : SimplePropertyMap(m), unsupported(m.unsupported)
{
}
PropertyMap::PropertyMap(const SimplePropertyMap &m) {
PropertyMap::PropertyMap(const SimplePropertyMap &m)
{
for(SimplePropertyMap::ConstIterator it = m.begin(); it != m.end(); ++it){
String key = it->first.upper();
if(!key.isEmpty())
@@ -45,14 +39,13 @@ PropertyMap::PropertyMap(const SimplePropertyMap &m)
else
unsupported.append(it->first);
}
}
PropertyMap::~PropertyMap()
{
}
PropertyMap::~PropertyMap() {}
bool PropertyMap::insert(const String &key, const StringList &values) {
bool PropertyMap::insert(const String &key, const StringList &values)
{
String realKey = key.upper();
Iterator result = SimplePropertyMap::find(realKey);
if(result == end())
@@ -60,6 +53,7 @@ bool PropertyMap::insert(const String &key, const StringList &values)
else
SimplePropertyMap::operator[](realKey).append(values);
return true;
}
bool PropertyMap::replace(const String &key, const StringList &values)

View File

@@ -115,8 +115,6 @@ namespace TagLib {
PropertyMap();
PropertyMap(const PropertyMap &m);
/*!
* Creates a PropertyMap initialized from a SimplePropertyMap. Copies all
* entries from \a m that have valid keys.

View File

@@ -62,13 +62,6 @@ StringList::StringList() :
}
StringList::StringList(const StringList &l) :
List<String>(l),
d(nullptr)
{
}
StringList::StringList(const String &s) :
List<String>(),
d(nullptr)

View File

@@ -57,7 +57,7 @@ namespace TagLib {
* implicitly shared, this method is lightweight and suitable for
* pass-by-value usage.
*/
StringList(const StringList &l);
StringList(const StringList &l) = default;
/*!
* Constructs a StringList with \a s as a member.

View File

@@ -193,7 +193,7 @@ namespace TagLib
// The last resort. May cause a buffer overflow.
length = vsprintf(buf, format, args);
if(length >= BufferSize) {
if(length >= (int)BufferSize) {
debug("Utils::formatString() - Buffer overflow! Returning an empty string.");
length = -1;
}