mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).
This commit is auto-generated:
$ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
Meta Ports Ladybird Tests Kernel)
$ perl -pie 's/\bDeprecatedString\b/ByteString/g;
s/deprecated_string/byte_string/g' $xs
$ clang-format --style=file -i \
$(git diff --name-only | grep \.cpp\|\.h)
$ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
committed by
Ali Mohammad Pur
parent
38d62563b3
commit
5e1499d104
@@ -5,8 +5,8 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibELF/DynamicLoader.h>
|
||||
#include <LibELF/DynamicObject.h>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace ELF {
|
||||
|
||||
DynamicObject::DynamicObject(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
|
||||
DynamicObject::DynamicObject(ByteString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
|
||||
: m_filepath(filepath)
|
||||
, m_base_address(base_address)
|
||||
, m_dynamic_address(dynamic_section_address)
|
||||
@@ -58,7 +58,7 @@ void DynamicObject::dump() const
|
||||
size_t num_dynamic_sections = 0;
|
||||
|
||||
for_each_dynamic_entry([&](DynamicObject::DynamicEntry const& entry) {
|
||||
DeprecatedString name_field = DeprecatedString::formatted("({})", name_for_dtag(entry.tag()));
|
||||
ByteString name_field = ByteString::formatted("({})", name_for_dtag(entry.tag()));
|
||||
builder.appendff("{:#08x} {:17} {:#08x}\n", entry.tag(), name_field, entry.val());
|
||||
num_dynamic_sections++;
|
||||
});
|
||||
@@ -508,7 +508,7 @@ auto DynamicObject::lookup_symbol(HashSymbol const& symbol) const -> Optional<Sy
|
||||
return SymbolLookupResult { symbol_result.value(), symbol_result.size(), symbol_result.address(), symbol_result.bind(), symbol_result.type(), this };
|
||||
}
|
||||
|
||||
NonnullRefPtr<DynamicObject> DynamicObject::create(DeprecatedString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
|
||||
NonnullRefPtr<DynamicObject> DynamicObject::create(ByteString const& filepath, VirtualAddress base_address, VirtualAddress dynamic_section_address)
|
||||
{
|
||||
return adopt_ref(*new DynamicObject(filepath, base_address, dynamic_section_address));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user