Skip to content

Replace use of LargerType in constructors with ShiftType #83

@Pharap

Description

@Pharap

This change would have two potential benefits:

  • The undefined behaviour eminating from << with a negative left hand value would be replaced with the well-defined behaviour of an unsigned type.
  • Theoretically this should generate less code because the code would no longer be using unnecessary excess bytes during the shift operation. Whether this is true in practice would have to be tested - the compiler may already be optimising this.

The code should be functionally equivalent, hence this should be a 'patch' change.

Metadata

Metadata

Assignees

Labels

ImprovementThis change improves the code's behaviourOptimisationThis change somehow improves optimisationPatchThis change is an unobtrusive change

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions