Преглед на файлове

LibIMAP: Make Section::parts unsigned

Luke преди 4 години
родител
ревизия
2c793d5935
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      Userland/Libraries/LibIMAP/Objects.h
  2. 2 2
      Userland/Libraries/LibIMAP/Parser.cpp

+ 1 - 1
Userland/Libraries/LibIMAP/Objects.h

@@ -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 {};

+ 2 - 2
Userland/Libraries/LibIMAP/Parser.cpp

@@ -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();