Skip to content

Commit b4e79a4

Browse files
complexlogicufleisch
authored andcommitted
Fix Clang build
1 parent 8083748 commit b4e79a4

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

taglib/matroska/matroskasimpletag.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include <memory>
2525
#include "tag.h"
26-
#include "matroskatag.h"
26+
//#include "matroskatag.h"
2727

2828
namespace TagLib {
2929
class String;

taglib/matroska/matroskatag.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ namespace
284284

285285
bool Matroska::Tag::setTag(const String &key, const String &value)
286286
{
287-
const auto& [name, targetTypeValue] = Matroska::Utils::translateKey(key);
287+
const auto pair = Matroska::Utils::translateKey(key);
288+
// Workaround Clang issue - no lambda capture of structured bindings
289+
const String &name = pair.first;
290+
auto targetTypeValue = pair.second;
288291
if (name.isEmpty())
289292
return false;
290293
removeSimpleTags(
@@ -305,7 +308,10 @@ bool Matroska::Tag::setTag(const String &key, const String &value)
305308

306309
const String* Matroska::Tag::getTag(const String &key) const
307310
{
308-
const auto& [name, targetTypeValue] = Matroska::Utils::translateKey(key);
311+
const auto pair = Matroska::Utils::translateKey(key);
312+
// Workaround Clang issue - no lambda capture of structured bindings
313+
const String &name = pair.first;
314+
auto targetTypeValue = pair.second;
309315
if (name.isEmpty())
310316
return nullptr;
311317
auto tag = dynamic_cast<const Matroska::SimpleTagString*>(

taglib/matroska/matroskatag.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#include "tstring.h"
3030
#include "tlist.h"
3131
#include "matroskafile.h"
32+
#include "matroskasimpletag.h"
3233

3334
namespace TagLib {
3435
namespace Matroska {
35-
class SimpleTag;
3636
using SimpleTagsList = List<SimpleTag*>;
3737
class TAGLIB_EXPORT Tag : public TagLib::Tag
3838
{
@@ -50,14 +50,14 @@ namespace TagLib {
5050
String genre() const override;
5151
unsigned int year() const override;
5252
unsigned int track() const override;
53-
void setTitle(const String &s);
54-
void setArtist(const String &s);
55-
void setAlbum(const String &s);
56-
void setComment(const String &s);
57-
void setGenre(const String &s);
58-
void setYear(unsigned int i);
59-
void setTrack(unsigned int i);
60-
bool isEmpty() const;
53+
void setTitle(const String &s) override;
54+
void setArtist(const String &s) override;
55+
void setAlbum(const String &s) override;
56+
void setComment(const String &s) override;
57+
void setGenre(const String &s) override;
58+
void setYear(unsigned int i) override;
59+
void setTrack(unsigned int i) override;
60+
bool isEmpty() const override;
6161
PropertyMap properties() const override;
6262
PropertyMap setProperties(const PropertyMap &propertyMap) override;
6363
template <typename T>

0 commit comments

Comments
 (0)