Skip to content

Explicitly cast 'size_t' to 'uint16_t' to avoid data loss warnings #1110

@boulabiar

Description

@boulabiar

I have implicit loss conversion warning on windows. (I treat warnings as errors)
Please replace line 13691:

per_methods_[method].trie.add(rule, per_methods_[method].rules.size() - 1, BP_index != INVALID_BP_ID ? blueprints[BP_index]->prefix().length() : 0, BP_index);

by

per_methods_[method].trie.add(rule, static_cast<uint16_t>(per_methods_[method].rules.size() - 1), BP_index != INVALID_BP_ID ? static_cast<uint16_t>(blueprints[BP_index]->prefix().length()) : 0, BP_index);

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureCode based project improvement

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions