Skip to content

Commit

Permalink
treat percentage like doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Jan 31, 2025
1 parent 49e06da commit 855f165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libmei/addons/att.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ data_ORIENTATION Att::StrToOrientation(const std::string &value, bool logWarning

std::string Att::PercentToStr(data_PERCENT data) const
{
return StringFormat("%.2f%%", data);
return DblToStr(data) + "%";
}

data_PERCENT Att::StrToPercent(const std::string &value, bool logWarning) const
Expand All @@ -646,7 +646,7 @@ data_PERCENT Att::StrToPercent(const std::string &value, bool logWarning) const

std::string Att::PercentLimitedToStr(data_PERCENT_LIMITED data) const
{
return StringFormat("%.2f%%", data);
return DblToStr(data) + "%";
}

data_PERCENT_LIMITED Att::StrToPercentLimited(const std::string &value, bool logWarning) const
Expand All @@ -661,7 +661,7 @@ data_PERCENT_LIMITED Att::StrToPercentLimited(const std::string &value, bool log

std::string Att::PercentLimitedSignedToStr(data_PERCENT_LIMITED_SIGNED data) const
{
return StringFormat("%.2f%%", data);
return DblToStr(data) + "%";
}

data_PERCENT_LIMITED_SIGNED Att::StrToPercentLimitedSigned(const std::string &value, bool logWarning) const
Expand Down

0 comments on commit 855f165

Please sign in to comment.