Skip to content

Commit

Permalink
Remove unused lambda in MathObjectTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Sep 23, 2023
1 parent 761f649 commit 74fe85b
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions include/fintamath/core/MathObjectTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,10 @@ struct hash<fintamath::MathObjectType> {
namespace fintamath {

class MathObjectBoundTypes {
static constexpr auto getTypeHash = [](const MathObjectType &type) { return size_t(type); };

using TypeMap = std::unordered_map<MathObjectType, MathObjectType>;

using enum MathObjectType::Id;

public:
static const TypeMap &get() {
return getMutable();
}

static void reg(const MathObjectType &type, const MathObjectType &boundType) {
getMutable().emplace(type, boundType);
}
using TypeMap = std::unordered_map<MathObjectType, MathObjectType>;

private:
static TypeMap &getMutable() {
static TypeMap ids{
{IMathObject, None},
Expand All @@ -223,6 +211,15 @@ class MathObjectBoundTypes {

return ids;
}

public:
static const TypeMap &get() {
return getMutable();
}

static void reg(const MathObjectType &type, const MathObjectType &boundType) {
getMutable().emplace(type, boundType);
}
};

inline bool isBaseOf(const MathObjectType &toType, const MathObjectType &fromType) {
Expand Down

0 comments on commit 74fe85b

Please sign in to comment.