Skip to content

Commit d14f61a

Browse files
authored
Choose more appropriate function for showing useless state (#874)
hasID does the same thing in this case, but isAvailable is the more appropriate choice, since a default constructed (non-interface) datatype will be available while it will also not have an ID.
1 parent 093ec0a commit d14f61a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/datamodel_syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ is currently being held internally.
196196

197197
```cpp
198198
auto energyType = TypeWithEnergy{}; // An empty interface is possible but useless
199-
bool hasID = energyType.hasID(); // <-- false
199+
bool hasID = energyType.isAvailable(); // <-- false
200200
201201
auto hit = ExampleHit{};
202202
energyType = hit; // assigning a hit to the interface type

0 commit comments

Comments
 (0)