Skip to content

Unnecessary (int) cast of return value in SFEVL53L1X::getDistance() #56

@thuscoder

Description

@thuscoder

uint16_t SFEVL53L1X::getDistance()
{
uint16_t distance;
_device->VL53L1X_GetDistance(&distance);
return (int)distance;
}

The function return type is uint16_t. Why is there an "(int)" cast in the return statement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions