mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Use std::enable_shared_from_this instead of thisP parameters.
This commit is contained in:
@@ -113,9 +113,6 @@ class ValueViewer : public StyleListener {
|
||||
Type##ValueViewer(DataViewer& parent, const Type ## StyleP& style)
|
||||
|
||||
#define IMPLEMENT_VALUE_VIEWER(Type) \
|
||||
ValueViewerP Type##Style::makeViewer(DataViewer& parent, const StyleP& thisP) { \
|
||||
assert(thisP.get() == this); \
|
||||
return ValueViewerP(new Type##ValueViewer(parent, static_pointer_cast<Type##Style>(thisP))); \
|
||||
ValueViewerP Type##Style::makeViewer(DataViewer& parent) { \
|
||||
return ValueViewerP(new Type##ValueViewer(parent, static_pointer_cast<Type##Style>(intrusive_from_this()))); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user