Skip to content

Commit

Permalink
Libraries: Add missing includes, add namespace qualifiers
Browse files Browse the repository at this point in the history
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 <LibDNS/Question.h>
    // That's it, this was enough to cause a compilation error.

Likewise for most other files touched by this commit.
  • Loading branch information
BenWiederhake authored and trflynn89 committed Sep 18, 2022
1 parent 48d8aff commit a99cd09
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ConnectionFromClient final : public LanguageServers::ConnectionFromClient
ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket)
: LanguageServers::ConnectionFromClient(move(socket))
{
m_autocomplete_engine = make<ShellComprehensionEngine>(m_filedb);
m_autocomplete_engine = make<CodeComprehension::Shell::ShellComprehensionEngine>(m_filedb);
m_autocomplete_engine->set_declarations_of_document_callback = [this](String const& filename, Vector<CodeComprehension::Declaration>&& declarations) {
async_declarations_in_document(filename, move(declarations));
};
Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibDNS/Question.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#include "Answer.h"
#include "Name.h"
#include <AK/Types.h>

Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibGPU/StencilConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#include <LibGPU/Config.h>
#include <LibGPU/Enums.h>

namespace GPU {
Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibGfx/Font/VectorFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <AK/Noncopyable.h>
#include <AK/RefCounted.h>
#include <LibGfx/Forward.h>

namespace Gfx {

Expand Down
9 changes: 6 additions & 3 deletions Userland/Libraries/LibGfx/PNGShared.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

#pragma once

#include <AK/Array.h>
#include <AK/SIMD.h>

namespace Gfx::PNG {

// https://www.w3.org/TR/PNG/#5PNG-file-signature
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibIPC/Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include <AK/Concepts.h>
#include <AK/HashMap.h>
#include <AK/StdLibExtras.h>
#include <LibCore/SharedCircularQueue.h>
#include <LibIPC/Forward.h>
Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibLine/Style.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <AK/String.h>
#include <AK/Types.h>
#include <AK/Utf8View.h>
#include <AK/Vector.h>
#include <stdlib.h>

Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibPDF/XRefTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibPDF/Error.h>

namespace PDF {

Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibSoftGPU/SIMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include <AK/SIMDExtras.h>
#include <AK/SIMDMath.h>
#include <LibGfx/Vector2.h>
#include <LibGfx/Vector3.h>
#include <LibGfx/Vector4.h>
Expand Down
1 change: 1 addition & 0 deletions Userland/Libraries/LibXML/DOM/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#include <AK/HashMap.h>
#include <AK/NonnullOwnPtrVector.h>
#include <AK/String.h>
#include <AK/Variant.h>
Expand Down

0 comments on commit a99cd09

Please sign in to comment.