Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Convert to the required integral type when multiplying a scalar with a curve point. #294

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ namespace nil {
GroupValueType>::type
operator*(const GroupValueType &left, const FieldValueType &right) {

return left * static_cast<typename GroupValueType::params_type::scalar_field_type::integral_type>(right.data);
// TODO(martun): consider deleting this function, and forcing all the callers to convert to the
// required type before multiplication.
return left * static_cast<typename GroupValueType::params_type::scalar_field_type::integral_type>(
typename FieldValueType::integral_type(right.data));
}

template<typename GroupValueType, typename FieldValueType>
Expand Down
Loading