Move the intrusive list hooks to the concrete entry types
This commit is contained in:
parent
cc7595e3c6
commit
3d35ba894c
5 changed files with 7 additions and 5 deletions
|
@ -22,7 +22,7 @@
|
|||
#include <vector>
|
||||
|
||||
/// @class AssAttachment
|
||||
class AssAttachment : public AssEntry {
|
||||
class AssAttachment : public AssEntry, public AssEntryListHook {
|
||||
/// ASS uuencoded entry data, including header.
|
||||
boost::flyweight<std::string> entry_data;
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ struct AssDialogueBase {
|
|||
boost::flyweight<std::string> Text;
|
||||
};
|
||||
|
||||
class AssDialogue : public AssEntry, public AssDialogueBase {
|
||||
class AssDialogue : public AssEntry, public AssDialogueBase, public AssEntryListHook {
|
||||
std::string GetData(bool ssa) const;
|
||||
|
||||
/// @brief Parse raw ASS data into everything else
|
||||
|
|
|
@ -46,7 +46,9 @@ enum class AssEntryGroup {
|
|||
GROUP_MAX
|
||||
};
|
||||
|
||||
class AssEntry : public boost::intrusive::make_list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>::type {
|
||||
using AssEntryListHook = boost::intrusive::make_list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>::type;
|
||||
|
||||
class AssEntry {
|
||||
public:
|
||||
virtual ~AssEntry() { }
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class AssStyle;
|
|||
class wxString;
|
||||
|
||||
template<typename T>
|
||||
using EntryList = typename boost::intrusive::make_list<T, boost::intrusive::constant_time_size<false>, boost::intrusive::base_hook<AssEntry>>::type;
|
||||
using EntryList = typename boost::intrusive::make_list<T, boost::intrusive::constant_time_size<false>, boost::intrusive::base_hook<AssEntryListHook>>::type;
|
||||
|
||||
struct AssFileCommit {
|
||||
wxString const& message;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <array>
|
||||
#include <wx/arrstr.h>
|
||||
|
||||
class AssStyle : public AssEntry {
|
||||
class AssStyle : public AssEntry, public AssEntryListHook {
|
||||
std::string data;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue