Skip to content

Commit

Permalink
fixup! refactor: slim down valuetransformer.h and auto memory management
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Nov 8, 2024
1 parent 2d9821d commit 3974c37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/valuetransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ double ValueTransformer::transform(double argument) const {
m_transformers.cend(),
argument,
[&](double argument, const auto& pNode) {
return pNode->transformInverse(argument);
return pNode->transform(argument);
});
}

Expand All @@ -113,6 +113,7 @@ std::unique_ptr<ValueTransformer> ValueTransformer::parseFromXml(
return nullptr;
}

// constructor is private, so we can't use std::make_unique
auto pTransformer = std::unique_ptr<ValueTransformer>(new ValueTransformer());

auto maybeAddFromElement = [&]<typename T>(auto element) {
Expand Down

0 comments on commit 3974c37

Please sign in to comment.