diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-11-26 16:11:07 -0800 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-11-26 16:47:39 -0800 |
commit | f807796380e89a03aeed1c46b82d6012e5f9dad7 (patch) | |
tree | 7ee1d118a47f7196a49936c273a988b4da5ad078 /Userland | |
parent | 957f54d96fbc1847a175b0dc4f82c3da5df7fa90 (diff) | |
download | serenity-f807796380e89a03aeed1c46b82d6012e5f9dad7.zip |
UserspaceEmulator: Fix after add_positional_argument API change :^)
Get UE compiling again after the Vector<String> API was changed to
Vector<StringView>.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator.cpp | 4 | ||||
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator.h | 4 | ||||
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/main.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp index 0ea461c761..62c011de07 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp @@ -41,7 +41,7 @@ Emulator& Emulator::the() return *s_the; } -Emulator::Emulator(String const& executable_path, Vector<String> const& arguments, Vector<String> const& environment) +Emulator::Emulator(String const& executable_path, Vector<StringView> const& arguments, Vector<String> const& environment) : m_executable_path(executable_path) , m_arguments(arguments) , m_environment(environment) @@ -103,7 +103,7 @@ void Emulator::setup_stack(Vector<ELF::AuxiliaryValue> aux_vector) Vector<u32> argv_entries; for (auto& argument : m_arguments) { - m_cpu.push_string(argument.characters()); + m_cpu.push_string(argument); argv_entries.append(m_cpu.esp().value()); } diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.h b/Userland/DevTools/UserspaceEmulator/Emulator.h index 5de623ae6c..e4bd616d84 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.h +++ b/Userland/DevTools/UserspaceEmulator/Emulator.h @@ -31,7 +31,7 @@ class Emulator { public: static Emulator& the(); - Emulator(String const& executable_path, Vector<String> const& arguments, Vector<String> const& environment); + Emulator(String const& executable_path, Vector<StringView> const& arguments, Vector<String> const& environment); void set_profiling_details(bool should_dump_profile, size_t instruction_interval, OutputFileStream* profile_stream, NonnullOwnPtrVector<String>* profiler_strings, Vector<int>* profiler_string_id_map) { @@ -113,7 +113,7 @@ public: private: const String m_executable_path; - const Vector<String> m_arguments; + const Vector<StringView> m_arguments; const Vector<String> m_environment; SoftMMU m_mmu; diff --git a/Userland/DevTools/UserspaceEmulator/main.cpp b/Userland/DevTools/UserspaceEmulator/main.cpp index c616dc1cca..cad02f58d9 100644 --- a/Userland/DevTools/UserspaceEmulator/main.cpp +++ b/Userland/DevTools/UserspaceEmulator/main.cpp @@ -21,7 +21,7 @@ bool g_report_to_debug = false; int main(int argc, char** argv, char** env) { - Vector<String> arguments; + Vector<StringView> arguments; bool pause_on_startup { false }; String profile_dump_path; FILE* profile_output_file { nullptr }; |