Skip to content

Unused char_count in src/detail/utf8.cpp #473

Closed
@anarthal

Description

@anarthal

In these lines:

process/src/detail/utf8.cpp

Lines 208 to 225 in e637f84

std::size_t size_as_wide(const char * in, std::size_t size, error_code &)
{
const auto from = in;
const auto from_end = from + size;
const char * from_next = from;
std::size_t char_count = 0u;
while (from_next < from_end)
{
++char_count;
unsigned int octet_count = get_octet_count(*from_next);
// The buffer may represent incomplete characters, so terminate early if one is found
if (octet_count > static_cast<std::size_t>(from_end - from_next))
break;
from_next += octet_count;
}
return from_next - from;
}

char_count doesn't seem to be used anyhow. Compilers complain about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions