1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:37:34 +00:00

Everywhere: Stop shoving things into ::std and mentioning them as such

Note that this still keeps the old behaviour of putting things in std by
default on serenity so the tools can be happy, but if USING_AK_GLOBALLY
is unset, AK behaves like a good citizen and doesn't try to put things
in the ::std namespace.

std::nothrow_t and its friends get to stay because I'm being told that
compilers assume things about them and I can't yeet them into a
different namespace...for now.
This commit is contained in:
Ali Mohammad Pur 2022-12-13 10:29:30 +03:30 committed by Andreas Kling
parent 72514d6915
commit f96a3c002a
27 changed files with 56 additions and 55 deletions

View file

@ -74,7 +74,7 @@ ALWAYS_INLINE ErrorOr<void> unveil(char const (&path)[NPath], char const (&permi
return unveil(StringView { path, NPath - 1 }, StringView { permissions, NPermissions - 1 });
}
ALWAYS_INLINE ErrorOr<void> unveil(std::nullptr_t, std::nullptr_t)
ALWAYS_INLINE ErrorOr<void> unveil(nullptr_t, nullptr_t)
{
return unveil(StringView {}, StringView {});
}

View file

@ -126,7 +126,7 @@ Result<StringView, DecodeError> Decoder::decode_octet_string(ReadonlyBytes bytes
return StringView { bytes.data(), bytes.size() };
}
Result<std::nullptr_t, DecodeError> Decoder::decode_null(ReadonlyBytes data)
Result<nullptr_t, DecodeError> Decoder::decode_null(ReadonlyBytes data)
{
if (data.size() != 0)
return DecodeError::InvalidInputFormat;

View file

@ -217,7 +217,7 @@ private:
static Result<bool, DecodeError> decode_boolean(ReadonlyBytes);
static Result<UnsignedBigInteger, DecodeError> decode_arbitrary_sized_integer(ReadonlyBytes);
static Result<StringView, DecodeError> decode_octet_string(ReadonlyBytes);
static Result<std::nullptr_t, DecodeError> decode_null(ReadonlyBytes);
static Result<nullptr_t, DecodeError> decode_null(ReadonlyBytes);
static Result<Vector<int>, DecodeError> decode_object_identifier(ReadonlyBytes);
static Result<StringView, DecodeError> decode_printable_string(ReadonlyBytes);
static Result<BitStringView, DecodeError> decode_bit_string(ReadonlyBytes);

View file

@ -222,7 +222,7 @@ Icon FileIconProvider::icon_for_executable(DeprecatedString const& path)
continue;
}
icon.set_bitmap_for_size(icon_section.image_size, std::move(bitmap));
icon.set_bitmap_for_size(icon_section.image_size, move(bitmap));
}
if (had_error) {

View file

@ -948,7 +948,7 @@ public:
{
}
explicit Yield(std::nullptr_t)
explicit Yield(nullptr_t)
: Instruction(Type::Yield)
{
}

View file

@ -129,7 +129,7 @@ public:
{
}
GCPtr(std::nullptr_t)
GCPtr(nullptr_t)
: m_ptr(nullptr)
{
}

View file

@ -24,7 +24,7 @@ class SafeFunction<Out(In...)> {
public:
SafeFunction() = default;
SafeFunction(std::nullptr_t)
SafeFunction(nullptr_t)
{
}
@ -102,7 +102,7 @@ public:
return *this;
}
SafeFunction& operator=(std::nullptr_t)
SafeFunction& operator=(nullptr_t)
{
clear();
return *this;

View file

@ -16,7 +16,7 @@ DeprecatedString Value::to_deprecated_string(int indent) const
// Return type deduction means that we can't use implicit conversions.
return "<empty>";
},
[&](std::nullptr_t const&) -> DeprecatedString {
[&](nullptr_t const&) -> DeprecatedString {
return "null";
},
[&](bool const& b) -> DeprecatedString {

View file

@ -16,7 +16,7 @@
namespace PDF {
class Value : public Variant<Empty, std::nullptr_t, bool, int, float, Reference, NonnullRefPtr<Object>> {
class Value : public Variant<Empty, nullptr_t, bool, int, float, Reference, NonnullRefPtr<Object>> {
public:
using Variant::Variant;

View file

@ -139,7 +139,7 @@ ErrorOr<NonnullRefPtr<SQLClient>> SQLClient::launch_server_and_create_client(Str
auto socket = TRY(Core::Stream::LocalSocket::connect(move(socket_path)));
TRY(socket->set_blocking(true));
return adopt_nonnull_ref_or_enomem(new (nothrow) SQLClient(std::move(socket)));
return adopt_nonnull_ref_or_enomem(new (nothrow) SQLClient(move(socket)));
}
#endif