Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Dec 13, 2024
1 parent 01cf39b commit 8c02519
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 90 deletions.
4 changes: 4 additions & 0 deletions include/openPMD/RecordComponent.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ RecordComponent::loadChunk(std::shared_ptr<T> data, Offset o, Extent e)
/*
* For constant components, we implement type conversion, so there is
* a separate check further below.
* This is especially useful for the short-attribute representation in the
* JSON/TOML backends as they might implicitly turn a LONG into an INT in a
* constant component. The frontend needs to catch such edge cases.
* Ref. `if (constant())` branch.
*/
if (dtype != getDatatype() && !constant())
if (!isSameInteger<T>(getDatatype()) &&
Expand Down
Loading

0 comments on commit 8c02519

Please sign in to comment.