Skip to content

Commit

Permalink
Userland: Remove a few gratuitous IPC namespace qualifiers
Browse files Browse the repository at this point in the history
Spotted this while trying to search for specific IPC encode/decode
implementations. Now they are all the same, so searching is easier.
  • Loading branch information
vkoskiv authored and linusg committed Apr 3, 2022
1 parent 85ed64b commit f2c0207
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Userland/DevTools/HackStudio/AutoCompleteResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace IPC {

template<>
inline bool encode(IPC::Encoder& encoder, const GUI::AutocompleteProvider::Entry& response)
inline bool encode(Encoder& encoder, const GUI::AutocompleteProvider::Entry& response)
{
encoder << response.completion;
encoder << response.partial_input_length;
Expand All @@ -27,7 +27,7 @@ inline bool encode(IPC::Encoder& encoder, const GUI::AutocompleteProvider::Entry
}

template<>
inline ErrorOr<void> decode(IPC::Decoder& decoder, GUI::AutocompleteProvider::Entry& response)
inline ErrorOr<void> decode(Decoder& decoder, GUI::AutocompleteProvider::Entry& response)
{
TRY(decoder.decode(response.completion));
TRY(decoder.decode(response.partial_input_length));
Expand Down
4 changes: 2 additions & 2 deletions Userland/Libraries/LibCore/DateTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DateTime {

namespace IPC {

bool encode(IPC::Encoder&, Core::DateTime const&);
ErrorOr<void> decode(IPC::Decoder&, Core::DateTime&);
bool encode(Encoder&, Core::DateTime const&);
ErrorOr<void> decode(Decoder&, Core::DateTime&);

}
4 changes: 2 additions & 2 deletions Userland/Libraries/LibGfx/Color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ Vector<Color> Color::tints(u32 steps, float max) const

}

bool IPC::encode(IPC::Encoder& encoder, Color const& color)
bool IPC::encode(Encoder& encoder, Color const& color)
{
encoder << color.value();
return true;
}

ErrorOr<void> IPC::decode(IPC::Decoder& decoder, Color& color)
ErrorOr<void> IPC::decode(Decoder& decoder, Color& color)
{
u32 rgba;
TRY(decoder.decode(rgba));
Expand Down
4 changes: 2 additions & 2 deletions Userland/Libraries/LibWeb/Cookie/ParsedCookie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Optional<Core::DateTime> parse_date_time(StringView date_string)

}

bool IPC::encode(IPC::Encoder& encoder, Web::Cookie::ParsedCookie const& cookie)
bool IPC::encode(Encoder& encoder, Web::Cookie::ParsedCookie const& cookie)
{
encoder << cookie.name;
encoder << cookie.value;
Expand All @@ -347,7 +347,7 @@ bool IPC::encode(IPC::Encoder& encoder, Web::Cookie::ParsedCookie const& cookie)
return true;
}

ErrorOr<void> IPC::decode(IPC::Decoder& decoder, Web::Cookie::ParsedCookie& cookie)
ErrorOr<void> IPC::decode(Decoder& decoder, Web::Cookie::ParsedCookie& cookie)
{
TRY(decoder.decode(cookie.name));
TRY(decoder.decode(cookie.value));
Expand Down
4 changes: 2 additions & 2 deletions Userland/Libraries/LibWeb/Cookie/ParsedCookie.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Optional<ParsedCookie> parse_cookie(String const& cookie_string);

namespace IPC {

bool encode(IPC::Encoder&, Web::Cookie::ParsedCookie const&);
ErrorOr<void> decode(IPC::Decoder&, Web::Cookie::ParsedCookie&);
bool encode(Encoder&, Web::Cookie::ParsedCookie const&);
ErrorOr<void> decode(Decoder&, Web::Cookie::ParsedCookie&);

}

0 comments on commit f2c0207

Please sign in to comment.