mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibIPC: Remove redundant IPC::Dictionary type
We already have and use HashMap<DeprecatedString, DeprecatedString> nearly everywhere, which is essentially equivalent.
This commit is contained in:
parent
d030f0fe9b
commit
943ecaede6
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/BenWiederhake
Commit: 943ecaede6
Pull-request: https://github.com/SerenityOS/serenity/pull/18928
7 changed files with 0 additions and 94 deletions
|
@ -13,7 +13,6 @@
|
|||
#include <LibCore/Proxy.h>
|
||||
#include <LibCore/Socket.h>
|
||||
#include <LibIPC/Decoder.h>
|
||||
#include <LibIPC/Dictionary.h>
|
||||
#include <LibIPC/File.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
@ -84,21 +83,6 @@ ErrorOr<URL> decode(Decoder& decoder)
|
|||
return URL { url };
|
||||
}
|
||||
|
||||
template<>
|
||||
ErrorOr<Dictionary> decode(Decoder& decoder)
|
||||
{
|
||||
auto size = TRY(decoder.decode_size());
|
||||
Dictionary dictionary {};
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
auto key = TRY(decoder.decode<DeprecatedString>());
|
||||
auto value = TRY(decoder.decode<DeprecatedString>());
|
||||
dictionary.add(move(key), move(value));
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
template<>
|
||||
ErrorOr<File> decode(Decoder& decoder)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue