Просмотр исходного кода

LibPDF: Fix a typo in a function name

...and while here, a comment typo too.
Nico Weber 2 лет назад
Родитель
Сommit
93357a8b70
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      Userland/Libraries/LibPDF/Document.h
  2. 1 1
      Userland/Libraries/LibPDF/Parser.cpp

+ 2 - 2
Userland/Libraries/LibPDF/Document.h

@@ -119,10 +119,10 @@ public:
         return cast_to<T>(TRY(resolve(value)));
     }
 
-    /// Whether this Document is reasdy to resolve references, which is usually
+    /// Whether this Document is ready to resolve references, which is usually
     /// true, except just before the XRef table is parsed (and while the linearization
     /// dict is being read).
-    bool can_resolve_refefences() { return m_parser->can_resolve_references(); }
+    bool can_resolve_references() { return m_parser->can_resolve_references(); }
 
 private:
     explicit Document(NonnullRefPtr<DocumentParser> const& parser);

+ 1 - 1
Userland/Libraries/LibPDF/Parser.cpp

@@ -446,7 +446,7 @@ PDFErrorOr<NonnullRefPtr<StreamObject>> Parser::parse_stream(NonnullRefPtr<DictO
     ReadonlyBytes bytes;
 
     auto maybe_length = dict->get(CommonNames::Length);
-    if (maybe_length.has_value() && m_document->can_resolve_refefences()) {
+    if (maybe_length.has_value() && m_document->can_resolve_references()) {
         // The PDF writer has kindly provided us with the direct length of the stream
         m_reader.save();
         auto length = TRY(m_document->resolve_to<int>(maybe_length.value()));