-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
110 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,8 @@ class Spacer; | |
class StaffLines; | ||
class Ambitus; | ||
class Bracket; | ||
class InstrumentChange; | ||
class Text; | ||
|
||
enum class SymId; | ||
|
||
|
@@ -673,6 +675,7 @@ class Element : public QObject, public ScoreElement { | |
CONVERT(StaffLines, STAFF_LINES) | ||
CONVERT(Ambitus, AMBITUS) | ||
CONVERT(Bracket, BRACKET) | ||
CONVERT(InstrumentChange, INSTRUMENT_CHANGE) | ||
#undef CONVERT | ||
}; | ||
|
||
|
@@ -696,7 +699,7 @@ static inline const ChordRest* toChordRest(const Element* e) { | |
} | ||
|
||
#define CONVERT(a,b) \ | ||
static inline a* to##a(Element* e) { Q_ASSERT(e == 0 || e->type() == Element::Type::b); return (a*)e; } \ | ||
static inline a* to##a(Element* e) { Q_ASSERT(e == 0 || e->type() == Element::Type::b); return (a*)e; } \ | ||
static inline const a* to##a(const Element* e) { Q_ASSERT(e == 0 || e->type() == Element::Type::b); return (const a*)e; } | ||
|
||
CONVERT(Note, NOTE) | ||
|
@@ -739,6 +742,8 @@ static inline const a* to##a(const Element* e) { Q_ASSERT(e == 0 || e->type() == | |
CONVERT(StaffLines, STAFF_LINES) | ||
CONVERT(Ambitus, AMBITUS) | ||
CONVERT(Bracket, BRACKET) | ||
CONVERT(InstrumentChange, INSTRUMENT_CHANGE) | ||
CONVERT(Text, TEXT) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
wschweer
Author
Contributor
|
||
#undef CONVERT | ||
|
||
//--------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
not in 'is##a()` too?