Skip to content

Commit

Permalink
Merge pull request rism-digital#3932 from rettinghaus/develop-percent
Browse files Browse the repository at this point in the history
treat percentage like doubles
  • Loading branch information
lpugin authored Jan 31, 2025
2 parents 4e8693d + 855f165 commit 140e3db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
4 changes: 2 additions & 2 deletions src/findfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ FunctorCode FindAllReferencedObjectsFunctor::VisitObject(Object *object)
if (object->HasInterface(INTERFACE_FACSIMILE)) {
FacsimileInterface *interface = object->GetFacsimileInterface();
assert(interface);
if (interface->GetSurface()) m_elements->push_back(interface->GetSurface());
if (interface->GetZone()) m_elements->push_back(interface->GetZone());
if (interface->GetSurface()) m_elements->insert(interface->GetSurface());
if (interface->GetZone()) m_elements->insert(interface->GetZone());
}
if (object->HasInterface(INTERFACE_PLIST)) {
PlistInterface *interface = object->GetPlistInterface();
Expand Down

0 comments on commit 140e3db

Please sign in to comment.