summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wipfli <mail@maxwipfli.ch>2021-07-12 12:44:21 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-14 23:03:36 +0200
commit125982943afa452720bfdcd63b8ade8d3f887c19 (patch)
tree6b7507879b0f04f1c3be2c7b2bc1d6144a7d94ff
parent300823c314cd773cd10486b9066309415160eec5 (diff)
downloadserenity-125982943afa452720bfdcd63b8ade8d3f887c19.zip
LibWeb: Change HTMLTokenizer.{cpp,h} to east const style
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp8
-rw-r--r--Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
index 4ca33217a0..d36ed84187 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
@@ -175,7 +175,7 @@ namespace Web::HTML {
} \
}
-static inline void log_parse_error(const SourceLocation& location = SourceLocation::current())
+static inline void log_parse_error(SourceLocation const& location = SourceLocation::current())
{
dbgln_if(TOKENIZER_TRACE_DEBUG, "Parse error (tokenization) {}", location);
}
@@ -2618,7 +2618,7 @@ _StartOfFunction:
}
}
-bool HTMLTokenizer::consume_next_if_match(const StringView& string, CaseSensitivity case_sensitivity)
+bool HTMLTokenizer::consume_next_if_match(StringView const& string, CaseSensitivity case_sensitivity)
{
for (size_t i = 0; i < string.length(); ++i) {
auto code_point = peek_code_point(i);
@@ -2658,7 +2658,7 @@ void HTMLTokenizer::create_new_token(HTMLToken::Type type)
m_current_token.m_start_position = nth_last_position(offset);
}
-HTMLTokenizer::HTMLTokenizer(const StringView& input, const String& encoding)
+HTMLTokenizer::HTMLTokenizer(StringView const& input, String const& encoding)
{
auto* decoder = TextCodec::decoder_for(encoding);
VERIFY(decoder);
@@ -2704,7 +2704,7 @@ bool HTMLTokenizer::consumed_as_part_of_an_attribute() const
return m_return_state == State::AttributeValueUnquoted || m_return_state == State::AttributeValueSingleQuoted || m_return_state == State::AttributeValueDoubleQuoted;
}
-void HTMLTokenizer::restore_to(const Utf8CodePointIterator& new_iterator)
+void HTMLTokenizer::restore_to(Utf8CodePointIterator const& new_iterator)
{
if (new_iterator != m_prev_utf8_iterator) {
auto diff = m_prev_utf8_iterator - new_iterator;
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h
index 33f72ccbee..aa81d946b6 100644
--- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h
+++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h
@@ -100,7 +100,7 @@ namespace Web::HTML {
class HTMLTokenizer {
public:
- explicit HTMLTokenizer(const StringView& input, const String& encoding);
+ explicit HTMLTokenizer(StringView const& input, String const& encoding);
enum class State {
#define __ENUMERATE_TOKENIZER_STATE(state) state,
@@ -125,12 +125,12 @@ private:
void skip(size_t count);
Optional<u32> next_code_point();
Optional<u32> peek_code_point(size_t offset) const;
- bool consume_next_if_match(const StringView&, CaseSensitivity = CaseSensitivity::CaseSensitive);
+ bool consume_next_if_match(StringView const&, CaseSensitivity = CaseSensitivity::CaseSensitive);
void create_new_token(HTMLToken::Type);
bool current_end_tag_token_is_appropriate() const;
String consume_current_builder();
- static const char* state_name(State state)
+ static char const* state_name(State state)
{
switch (state) {
#define __ENUMERATE_TOKENIZER_STATE(state) \
@@ -148,7 +148,7 @@ private:
bool consumed_as_part_of_an_attribute() const;
- void restore_to(const Utf8CodePointIterator& new_iterator);
+ void restore_to(Utf8CodePointIterator const& new_iterator);
HTMLToken::Position nth_last_position(size_t n = 0);
State m_state { State::Data };