Skip to content

Commit

Permalink
use string empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Aug 25, 2024
1 parent f35064f commit 0867810
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/importexport/musicxml/internal/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5907,35 +5907,35 @@ static void directionJump(XmlWriter& xml, const Jump* const jp)
bool isDaCapo = false;
bool isDalSegno = false;
if (jtp == JumpType::DC) {
if (jp->xmlText() == "") {
if (jp->xmlText().empty()) {
words = u"D.C.";
} else {
words = jp->xmlText();
}
isDaCapo = true;
} else if (jtp == JumpType::DC_AL_FINE) {
if (jp->xmlText() == "") {
if (jp->xmlText().empty()) {
words = u"D.C. al Fine";
} else {
words = jp->xmlText();
}
isDaCapo = true;
} else if (jtp == JumpType::DC_AL_CODA) {
if (jp->xmlText() == "") {
if (jp->xmlText().empty()) {
words = u"D.C. al Coda";
} else {
words = jp->xmlText();
}
isDaCapo = true;
} else if (jtp == JumpType::DS_AL_CODA) {
if (jp->xmlText() == "") {
if (jp->xmlText().empty()) {
words = u"D.S. al Coda";
} else {
words = jp->xmlText();
}
isDalSegno = true;
} else if (jtp == JumpType::DS_AL_FINE) {
if (jp->xmlText() == "") {
if (jp->xmlText().empty()) {
words = u"D.S. al Fine";
} else {
words = jp->xmlText();
Expand All @@ -5957,7 +5957,7 @@ static void directionJump(XmlWriter& xml, const Jump* const jp)
if (isDaCapo) {
sound = u"dacapo=\"yes\"";
} else if (isDalSegno) {
if (jp->jumpTo() == "") {
if (jp->xmlText().empty()) {
sound = u"dalsegno=\"1\"";
} else {
sound = u"dalsegno=\"" + jp->jumpTo() + u"\"";
Expand Down Expand Up @@ -8596,7 +8596,7 @@ void ExportMusicXml::harmony(Harmony const* const h, FretDiagram const* const fd
if (!h->xmlKind().isEmpty()) {
String s = u"kind";
String kindText = h->musicXmlText();
if (h->musicXmlText() != u"") {
if (!h->musicXmlText().empty()) {
s += u" text=\"" + kindText + u"\"";
}
if (h->xmlSymbols() == u"yes") {
Expand Down Expand Up @@ -8716,7 +8716,7 @@ void ExportMusicXml::harmony(Harmony const* const h, FretDiagram const* const fd
if (!h->xmlKind().isEmpty()) {
String s = u"kind";
String kindText = h->musicXmlText();
if (h->musicXmlText() != "") {
if (!h->musicXmlText().empty()) {
s += u" text=\"" + kindText + u"\"";
}
if (h->xmlSymbols() == "yes") {
Expand Down

0 comments on commit 0867810

Please sign in to comment.