Commit graph

6 commits

Author SHA1 Message Date
Liav A
01ae3e9c85 AK: Use endianness flags to determine if conversion is necessary 2020-02-19 16:08:28 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
1bd3fca585 AK: Shim open_with_path_length() for non-Serenity builds.
This is pretty ugly but I don't want to *not* use open_with_path_length()
so let's just shim it.
2019-07-25 14:25:45 +02:00
Andreas Kling
afc638c3ab AK: Allow NonnullRefPtr::ptr() when in "unknown" typestate.
Clang loses the typestate when passing NonnullRefPtr's via lambda captures.
This is unfortunate, but not much we can do about it. Allowing ptr() makes
it possible to use captured NonnullRefPtrs as you'd expect.
2019-07-25 11:51:24 +02:00
Andreas Kling
ecc35876af AK: Move clang-specific consumable annotation helpers to Platform.h 2019-07-24 08:16:59 +02:00
Andreas Kling
c452aa891f AK: Add Platform.h with an ARCH() macro.
You can currently use this to detect the CPU architecture like so:

    #if ARCH(I386)
        ...
    #elif ARCH(X86_64)
        ...
    #else
        ...
    #endif

This will be helpful for separating out architecture-specific code blocks.
2019-07-09 15:48:04 +02:00