mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
Everywhere: Pass AK::StringView by value
This commit is contained in:
parent
ad5d217e76
commit
8b1108e485
392 changed files with 978 additions and 978 deletions
|
@ -138,7 +138,7 @@ void EvaluateExpressionDialog::handle_evaluation(const String& expression)
|
|||
set_output(JS::MarkupGenerator::html_from_value(m_interpreter->vm().last_value()));
|
||||
}
|
||||
|
||||
void EvaluateExpressionDialog::set_output(const StringView& html)
|
||||
void EvaluateExpressionDialog::set_output(StringView html)
|
||||
{
|
||||
auto paragraph = m_output_container->document().create_element("p");
|
||||
paragraph->set_inner_html(html);
|
||||
|
|
|
@ -19,7 +19,7 @@ private:
|
|||
|
||||
void build(Window* parent_window);
|
||||
void handle_evaluation(const String& expression);
|
||||
void set_output(const StringView& html);
|
||||
void set_output(StringView html);
|
||||
|
||||
NonnullOwnPtr<JS::Interpreter> m_interpreter;
|
||||
RefPtr<GUI::TextBox> m_text_editor;
|
||||
|
|
|
@ -89,7 +89,7 @@ static String variable_value_as_string(const Debug::DebugInfo::VariableInfo& var
|
|||
return String::formatted("type: {} @ {:p}, ", variable.type_name, variable_address);
|
||||
}
|
||||
|
||||
static Optional<u32> string_to_variable_value(const StringView& string_value, const Debug::DebugInfo::VariableInfo& variable)
|
||||
static Optional<u32> string_to_variable_value(StringView string_value, const Debug::DebugInfo::VariableInfo& variable)
|
||||
{
|
||||
if (variable.is_enum_type()) {
|
||||
auto prefix_string = String::formatted("{}::", variable.type_name);
|
||||
|
@ -124,7 +124,7 @@ static Optional<u32> string_to_variable_value(const StringView& string_value, co
|
|||
return {};
|
||||
}
|
||||
|
||||
void VariablesModel::set_variable_value(const GUI::ModelIndex& index, const StringView& string_value, GUI::Window* parent_window)
|
||||
void VariablesModel::set_variable_value(const GUI::ModelIndex& index, StringView string_value, GUI::Window* parent_window)
|
||||
{
|
||||
auto variable = static_cast<const Debug::DebugInfo::VariableInfo*>(index.internal_data());
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class VariablesModel final : public GUI::Model {
|
|||
public:
|
||||
static RefPtr<VariablesModel> create(const PtraceRegisters& regs);
|
||||
|
||||
void set_variable_value(const GUI::ModelIndex&, const StringView&, GUI::Window*);
|
||||
void set_variable_value(const GUI::ModelIndex&, StringView, GUI::Window*);
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
|
||||
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return 1; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue