summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2022-03-25 18:54:18 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2022-03-25 18:54:18 -0400
commit0eab7d2407a1e157e3b2274f941a2649cb84885a (patch)
tree774c2976d2edf0a2ac5c7a29258710012e3a7997
parent0a99ca6d50af51f1b0a151fdcac5e12ec9b01bf8 (diff)
downloadorcus-sax-parser-value-check.tar.gz
Update the method doc wrt valid stream check. sax-parser-value-check
Also make sure no callers check for valid stream before calling the method. Turns out there is only one call site that did the check.
-rw-r--r--include/orcus/sax_parser.hpp1
-rw-r--r--include/orcus/sax_parser_base.hpp9
2 files changed, 6 insertions, 4 deletions
diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
index 2e707568..365f87cc 100644
--- a/include/orcus/sax_parser.hpp
+++ b/include/orcus/sax_parser.hpp
@@ -467,7 +467,6 @@ void sax_parser<_Handler,_Config>::doctype()
next_check();
skip_space_and_control();
- has_char_throw("DOCTYPE section too short.");
// Parse FPI.
value(param.fpi, false);
diff --git a/include/orcus/sax_parser_base.hpp b/include/orcus/sax_parser_base.hpp
index d73432dc..bf12f580 100644
--- a/include/orcus/sax_parser_base.hpp
+++ b/include/orcus/sax_parser_base.hpp
@@ -204,9 +204,12 @@ protected:
void value_with_encoded_char(cell_buffer& buf, std::string_view& str, char quote_char);
/**
- * Parse quoted value. Note that the retrieved string may be stored in
- * the temporary cell buffer if the decode parameter is true. Use the
- * string immediately after this call before the buffer becomes invalid.
+ * Parse quoted value. Note that the retrieved string may be stored in a
+ * temporary cell buffer if the decode parameter is true. Use the string
+ * immediately after this call before the buffer becomes invalid.
+ *
+ * @note This method checks for valid stream; the caller doesn't need to
+ * check for valid stream before calling this method.
*
* @return true if the value is stored in temporary buffer, false
* otherwise.