Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

symbol_projection.cpp - error: narrowing conversion #16522

@jwinarske

Description

@jwinarske

In release v1.6.0 I see this error building with QNX SDP 7.0.0. Adding static_cast on the last return parameter resolves the issue.

/home/joel/third_party/mapbox-gl-native/src/mbgl/layout/symbol_projection.cpp: In function 'mbgl::PointAndCameraDistance mbgl::project(mbgl::Point&, const mat4&)':
/home/joel/third_party/mapbox-gl-native/src/mbgl/layout/symbol_projection.cpp:98:102: error: narrowing conversion of 'pos.std::__1::array<_Tp, _Size>::operator[]<double, 4ul>(3ul)' from 'std::__1::array<double, 4ul>::value_type {aka double}' to 'float' inside { } [-Werror=narrowing]
return {{ static_cast(pos[0] / pos[3]), static_cast(pos[1] / pos[3]) }, pos[3] };

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivedArchived because of inactivity

    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