LibIMAP: Make Section::parts unsigned

This commit is contained in:
Luke 2021-07-22 21:33:20 +01:00 committed by Ali Mohammad Pur
parent 27644785f1
commit 2c793d5935
Notes: sideshowbarker 2024-07-18 08:24:22 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -275,7 +275,7 @@ struct FetchCommand {
struct Section { struct Section {
SectionType type; SectionType type;
Optional<Vector<int>> parts {}; Optional<Vector<unsigned>> parts {};
bool ends_with_mime {}; bool ends_with_mime {};
Optional<Vector<String>> headers {}; Optional<Vector<String>> headers {};

View file

@ -716,12 +716,12 @@ FetchCommand::DataItem Parser::parse_fetch_data_item()
consume("]"); consume("]");
} else if (is_ascii_digit(section_type[0])) { } else if (is_ascii_digit(section_type[0])) {
data_item.section->type = FetchCommand::DataItem::SectionType::Parts; data_item.section->type = FetchCommand::DataItem::SectionType::Parts;
data_item.section->parts = Vector<int>(); data_item.section->parts = Vector<unsigned>();
while (!try_consume("]")) { while (!try_consume("]")) {
auto num = parse_number(); auto num = parse_number();
if (num != (unsigned)-1) { if (num != (unsigned)-1) {
data_item.section->parts->append((int)num); data_item.section->parts->append(num);
continue; continue;
} }
auto atom = parse_atom(); auto atom = parse_atom();