Skip to content

Commit

Permalink
std::distance with MSVC cause issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mmertama committed Nov 1, 2023
1 parent 3ddc115 commit 0ec0a82
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gempyrelib/src/element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,9 @@ std::optional<Element> Element::parent() const {
const auto pid = m_ui->ref().query<std::string>(m_id, "parent");
if(!pid || pid->empty())
return std::nullopt;
auto trimmed = std::string(GempyreUtils::trim(*pid));
if(trimmed.empty())
return std::nullopt;
if(trimmed == ": :") // see comment in JS
if(*pid == ": :") // see comment in JS
return m_ui->root();
return Gempyre::Element(*m_ui, std::move(trimmed));
return Gempyre::Element(*m_ui, *pid);
}


Expand Down

0 comments on commit 0ec0a82

Please sign in to comment.