From a99cd09891a4f052e15a405dfefe4ef437e74b0a Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Tue, 13 Sep 2022 17:42:39 +0200 Subject: Libraries: Add missing includes, add namespace qualifiers This remained undetected for a long time as HeaderCheck is disabled by default. This commit makes the following file compile again: // file: compile_me.cpp #include // That's it, this was enough to cause a compilation error. Likewise for most other files touched by this commit. --- .../Libraries/LibCodeComprehension/Shell/ConnectionFromClient.h | 2 +- Userland/Libraries/LibDNS/Question.h | 1 + Userland/Libraries/LibGPU/StencilConfiguration.h | 1 + Userland/Libraries/LibGfx/Font/VectorFont.h | 1 + Userland/Libraries/LibGfx/PNGShared.h | 9 ++++++--- Userland/Libraries/LibIPC/Encoder.h | 1 + Userland/Libraries/LibLine/Style.h | 1 + Userland/Libraries/LibPDF/XRefTable.h | 1 + Userland/Libraries/LibSoftGPU/SIMD.h | 1 + Userland/Libraries/LibXML/DOM/Node.h | 1 + 10 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibCodeComprehension/Shell/ConnectionFromClient.h b/Userland/Libraries/LibCodeComprehension/Shell/ConnectionFromClient.h index edebd3de35..e427b1175a 100644 --- a/Userland/Libraries/LibCodeComprehension/Shell/ConnectionFromClient.h +++ b/Userland/Libraries/LibCodeComprehension/Shell/ConnectionFromClient.h @@ -19,7 +19,7 @@ private: ConnectionFromClient(NonnullOwnPtr socket) : LanguageServers::ConnectionFromClient(move(socket)) { - m_autocomplete_engine = make(m_filedb); + m_autocomplete_engine = make(m_filedb); m_autocomplete_engine->set_declarations_of_document_callback = [this](String const& filename, Vector&& declarations) { async_declarations_in_document(filename, move(declarations)); }; diff --git a/Userland/Libraries/LibDNS/Question.h b/Userland/Libraries/LibDNS/Question.h index ccbb7825e6..e01c206622 100644 --- a/Userland/Libraries/LibDNS/Question.h +++ b/Userland/Libraries/LibDNS/Question.h @@ -6,6 +6,7 @@ #pragma once +#include "Answer.h" #include "Name.h" #include diff --git a/Userland/Libraries/LibGPU/StencilConfiguration.h b/Userland/Libraries/LibGPU/StencilConfiguration.h index 1c0d9503f0..b68b2d6ba1 100644 --- a/Userland/Libraries/LibGPU/StencilConfiguration.h +++ b/Userland/Libraries/LibGPU/StencilConfiguration.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace GPU { diff --git a/Userland/Libraries/LibGfx/Font/VectorFont.h b/Userland/Libraries/LibGfx/Font/VectorFont.h index 4932818f4d..ed7ec9d141 100644 --- a/Userland/Libraries/LibGfx/Font/VectorFont.h +++ b/Userland/Libraries/LibGfx/Font/VectorFont.h @@ -8,6 +8,7 @@ #include #include +#include namespace Gfx { diff --git a/Userland/Libraries/LibGfx/PNGShared.h b/Userland/Libraries/LibGfx/PNGShared.h index b1fecd12c1..299fceb29e 100644 --- a/Userland/Libraries/LibGfx/PNGShared.h +++ b/Userland/Libraries/LibGfx/PNGShared.h @@ -6,6 +6,9 @@ #pragma once +#include +#include + namespace Gfx::PNG { // https://www.w3.org/TR/PNG/#5PNG-file-signature @@ -33,9 +36,9 @@ enum class FilterType : u8 { ALWAYS_INLINE u8 paeth_predictor(u8 a, u8 b, u8 c) { int p = a + b - c; - int pa = abs(p - a); - int pb = abs(p - b); - int pc = abs(p - c); + int pa = AK::abs(p - a); + int pb = AK::abs(p - b); + int pc = AK::abs(p - c); if (pa <= pb && pa <= pc) return a; if (pb <= pc) diff --git a/Userland/Libraries/LibIPC/Encoder.h b/Userland/Libraries/LibIPC/Encoder.h index 4c39ebd64b..c5bbc72bea 100644 --- a/Userland/Libraries/LibIPC/Encoder.h +++ b/Userland/Libraries/LibIPC/Encoder.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include diff --git a/Userland/Libraries/LibLine/Style.h b/Userland/Libraries/LibLine/Style.h index a2b4e0bba3..9d2a3627e0 100644 --- a/Userland/Libraries/LibLine/Style.h +++ b/Userland/Libraries/LibLine/Style.h @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/Userland/Libraries/LibPDF/XRefTable.h b/Userland/Libraries/LibPDF/XRefTable.h index 8c5abe14c9..3aeb75d449 100644 --- a/Userland/Libraries/LibPDF/XRefTable.h +++ b/Userland/Libraries/LibPDF/XRefTable.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace PDF { diff --git a/Userland/Libraries/LibSoftGPU/SIMD.h b/Userland/Libraries/LibSoftGPU/SIMD.h index 5981166698..c0ab018cde 100644 --- a/Userland/Libraries/LibSoftGPU/SIMD.h +++ b/Userland/Libraries/LibSoftGPU/SIMD.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include diff --git a/Userland/Libraries/LibXML/DOM/Node.h b/Userland/Libraries/LibXML/DOM/Node.h index 1394538a95..a64463e4ca 100644 --- a/Userland/Libraries/LibXML/DOM/Node.h +++ b/Userland/Libraries/LibXML/DOM/Node.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include -- cgit v1.2.3