mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
AK: Cleanup missing includes and #ifdef evaluation
Problem: - Several files have missing includes. This results in complaints from `clang-tidy`. - `#ifdef` is followed by `#elif <value>` which evaluates to `0`. Solution: - Add missing includes. - Change to `#elif defined(<value>)`.
This commit is contained in:
parent
bbc0487ced
commit
7d8a9bdb1e
5 changed files with 10 additions and 3 deletions
|
@ -26,7 +26,12 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/Noncopyable.h>
|
||||||
|
#include <AK/Span.h>
|
||||||
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Stream.h>
|
#include <AK/Stream.h>
|
||||||
|
#include <AK/Types.h>
|
||||||
|
#include <AK/kmalloc.h>
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <AK/Platform.h>
|
#include <AK/Platform.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
#include <AK/kmalloc.h>
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include <AK/Assertions.h>
|
#include <AK/Assertions.h>
|
||||||
#include <AK/Atomic.h>
|
#include <AK/Atomic.h>
|
||||||
|
#include <AK/Noncopyable.h>
|
||||||
#include <AK/kmalloc.h>
|
#include <AK/kmalloc.h>
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
# include <Kernel/Arch/i386/CPU.h>
|
# include <Kernel/Arch/i386/CPU.h>
|
||||||
|
|
|
@ -96,12 +96,12 @@ public:
|
||||||
return List::contains_slow(value);
|
return List::contains_slow(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
using Iterator = List::Iterator;
|
using Iterator = typename List::Iterator;
|
||||||
friend Iterator;
|
friend Iterator;
|
||||||
Iterator begin() { return List::begin(); }
|
Iterator begin() { return List::begin(); }
|
||||||
Iterator end() { return List::end(); }
|
Iterator end() { return List::end(); }
|
||||||
|
|
||||||
using ConstIterator = List::ConstIterator;
|
using ConstIterator = typename List::ConstIterator;
|
||||||
friend ConstIterator;
|
friend ConstIterator;
|
||||||
ConstIterator begin() const { return List::begin(); }
|
ConstIterator begin() const { return List::begin(); }
|
||||||
ConstIterator end() const { return List::end(); }
|
ConstIterator end() const { return List::end(); }
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#ifdef __serenity__
|
#ifdef __serenity__
|
||||||
# include <serenity.h>
|
# include <serenity.h>
|
||||||
#elif __linux__ or __APPLE__
|
#elif defined(__linux__) or defined(__APPLE__)
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue