Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang-rt/lib/runtime/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ RT_API_ATTRS void Descriptor::Establish(int characterKind,
RT_API_ATTRS void Descriptor::Establish(const typeInfo::DerivedType &dt,
void *p, int rank, const SubscriptValue *extent,
ISO::CFI_attribute_t attribute) {
std::size_t elementBytes{dt.sizeInBytes()};
std::size_t elementBytes{static_cast<std::size_t>(dt.sizeInBytes())};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a stylistic point, I usually use auto for declarations initialized with casts, since the type is obvious and doesn't need to appear twice.

ISO::EstablishDescriptor(
&raw_, p, attribute, CFI_type_struct, elementBytes, rank, extent);
if (elementBytes == 0) {
Expand Down
Loading