Skip to content

Commit 53e62ec

Browse files
Merge pull request #1099 from Geode-solutions/fix/component-id-in-component
fix(Model): move up component_id() in Component class
2 parents dfcb522 + 9fbdd57 commit 53e62ec

File tree

11 files changed

+21
-60
lines changed

11 files changed

+21
-60
lines changed

include/geode/model/mixin/core/block.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ namespace geode
7272
return component_type_static();
7373
}
7474

75-
[[nodiscard]] ComponentID component_id() const
76-
{
77-
return { this->component_type_static(), this->id() };
78-
};
79-
8075
template < typename TypedMesh = Mesh >
8176
[[nodiscard]] const TypedMesh& mesh() const
8277
{

include/geode/model/mixin/core/block_collection.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ namespace geode
6363
return component_type_static();
6464
}
6565

66-
[[nodiscard]] ComponentID component_id() const
67-
{
68-
return { this->component_type_static(), this->id() };
69-
};
70-
7166
public:
7267
BlockCollection( BlockCollectionsKey ) : BlockCollection() {}
7368

include/geode/model/mixin/core/component.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ namespace geode
5252

5353
[[nodiscard]] virtual ComponentType component_type() const = 0;
5454

55+
[[nodiscard]] ComponentID component_id() const;
56+
5557
protected:
5658
Component();
5759

include/geode/model/mixin/core/corner.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ namespace geode
7272
return component_type_static();
7373
}
7474

75-
[[nodiscard]] ComponentID component_id() const
76-
{
77-
return { this->component_type_static(), this->id() };
78-
};
79-
8075
[[nodiscard]] const Mesh& mesh() const;
8176

8277
[[nodiscard]] const MeshImpl& mesh_type() const;

include/geode/model/mixin/core/corner_collection.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ namespace geode
6363
return component_type_static();
6464
}
6565

66-
[[nodiscard]] ComponentID component_id() const
67-
{
68-
return { this->component_type_static(), this->id() };
69-
};
70-
7166
public:
7267
CornerCollection( CornerCollectionsKey ) : CornerCollection() {}
7368

include/geode/model/mixin/core/line.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ namespace geode
7171
return component_type_static();
7272
}
7373

74-
[[nodiscard]] ComponentID component_id() const
75-
{
76-
return { this->component_type_static(), this->id() };
77-
};
78-
7974
[[nodiscard]] const Mesh& mesh() const;
8075

8176
[[nodiscard]] const MeshImpl& mesh_type() const;

include/geode/model/mixin/core/line_collection.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ namespace geode
6363
return component_type_static();
6464
}
6565

66-
[[nodiscard]] ComponentID component_id() const
67-
{
68-
return { this->component_type_static(), this->id() };
69-
};
70-
7166
public:
7267
LineCollection( LineCollectionsKey ) : LineCollection() {}
7368

include/geode/model/mixin/core/model_boundary.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ namespace geode
6363
return component_type_static();
6464
}
6565

66-
[[nodiscard]] ComponentID component_id() const
67-
{
68-
return { this->component_type_static(), this->id() };
69-
};
70-
7166
public:
7267
ModelBoundary( ModelBoundariesKey ) : ModelBoundary() {}
7368

include/geode/model/mixin/core/surface.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ namespace geode
7171
return component_type_static();
7272
}
7373

74-
[[nodiscard]] ComponentID component_id() const
75-
{
76-
return { this->component_type_static(), this->id() };
77-
};
78-
7974
template < typename TypedMesh = Mesh >
8075
[[nodiscard]] const TypedMesh& mesh() const
8176
{

include/geode/model/mixin/core/surface_collection.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ namespace geode
6363
return component_type_static();
6464
}
6565

66-
[[nodiscard]] ComponentID component_id() const
67-
{
68-
return { this->component_type_static(), this->id() };
69-
};
70-
7166
public:
7267
SurfaceCollection( SurfaceCollectionsKey ) : SurfaceCollection() {}
7368

0 commit comments

Comments
 (0)